From 2293fd2251a1ae30a8bcd7fa5adab27b9ad6a075 Mon Sep 17 00:00:00 2001 From: Safiire Date: Fri, 4 Mar 2016 17:10:27 -0800 Subject: [PATCH] Enabled minitest from the rakefile --- Gemfile | 2 ++ Rakefile | 7 ++++++- test/test_memory_space.rb | 6 +++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index 51f188a..9679e2f 100644 --- a/Gemfile +++ b/Gemfile @@ -2,3 +2,5 @@ source 'https://rubygems.org' # Specify your gem's dependencies in n65.gemspec gemspec + +Gem 'mintest' diff --git a/Rakefile b/Rakefile index 809eb56..275d7ff 100644 --- a/Rakefile +++ b/Rakefile @@ -1,2 +1,7 @@ -require "bundler/gem_tasks" +require 'bundler/gem_tasks' +require 'rake/testtask' + +Rake::TestTask.new do |t| + t.pattern = 'test/test*.rb' +end diff --git a/test/test_memory_space.rb b/test/test_memory_space.rb index 13ba752..1e68051 100644 --- a/test/test_memory_space.rb +++ b/test/test_memory_space.rb @@ -8,7 +8,7 @@ require_relative '../lib/n65/memory_space.rb' class TestMemorySpace < MiniTest::Test include N65 - def _test_create_prog_rom + def test_create_prog_rom ## First just try to read alll of it space = MemorySpace.create_prog_rom contents = space.read(0x8000, 0x4000) @@ -23,7 +23,7 @@ class TestMemorySpace < MiniTest::Test end - def _test_writing + def test_writing ## Write some bytes into prog 2 area space = MemorySpace.create_prog_rom space.write(0xC000, "hi there".bytes) @@ -38,7 +38,7 @@ class TestMemorySpace < MiniTest::Test end - def _test_reading_out_of_bounds + def test_reading_out_of_bounds space = MemorySpace.create_prog_rom assert_raises(MemorySpace::AccessOutsideProgRom) do space.read(0x200, 10)