fix positioned tests

thanks to codeclimate
the broken tests were still raising errors, just the wrong ones, but
coverage shoed it!
This commit is contained in:
Torsten Ruger 2017-01-02 00:53:28 +02:00
parent 23c8f54cd5
commit 7602fd0af4
2 changed files with 4 additions and 4 deletions

View File

@ -6,4 +6,4 @@ require_relative "test_compat"
require_relative "test_instructions" require_relative "test_instructions"
require_relative "test_machine" require_relative "test_machine"
require_relative "test_padding" require_relative "test_padding"
require_relative "test_positioning" require_relative "test_positioned"

View File

@ -1,6 +1,6 @@
require_relative "../helper" require_relative "../helper"
class TestPositioning < MiniTest::Test class TestPositioned < MiniTest::Test
def setup def setup
Register.machine.boot unless Register.machine.booted Register.machine.boot unless Register.machine.booted
end end
@ -22,10 +22,10 @@ class TestPositioning < MiniTest::Test
assert_equal 32 , word.padded_length assert_equal 32 , word.padded_length
end end
def test_raises_no_init def test_raises_no_init
assert_raises { TestPosition.new.position} assert_raises { Positioned.position(self)}
end end
def test_raises_set_nil def test_raises_set_nil
assert_raises { TestPosition.new.set_position nil} assert_raises { Positioned.set_position(self,nil)}
end end
def test_raises_reset_far def test_raises_reset_far
assert_raises do assert_raises do