2019-08-06 19:44:39 +02:00
|
|
|
|
|
|
|
require_relative "helper"
|
|
|
|
|
2019-10-03 19:55:41 +02:00
|
|
|
module SlotMachine
|
2019-08-06 19:44:39 +02:00
|
|
|
class TestInstruction < MiniTest::Test
|
|
|
|
|
|
|
|
def test_instantiates
|
|
|
|
assert Instruction.new("Hi")
|
|
|
|
end
|
|
|
|
def test_string_source
|
|
|
|
assert_equal "Hi" ,Instruction.new("Hi").source
|
|
|
|
end
|
|
|
|
def test_nil_next
|
|
|
|
assert_nil Instruction.new("Hi").next
|
|
|
|
end
|
|
|
|
def test_raise
|
2019-08-17 22:29:42 +02:00
|
|
|
assert_raises {Instruction.new(5)}
|
2019-08-06 19:44:39 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|