Enabled minitest from the rakefile

This commit is contained in:
Safiire 2016-03-04 17:10:27 -08:00
parent ad088d0164
commit 2293fd2251
3 changed files with 11 additions and 4 deletions

View File

@ -2,3 +2,5 @@ source 'https://rubygems.org'
# Specify your gem's dependencies in n65.gemspec
gemspec
Gem 'mintest'

View File

@ -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

View File

@ -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)