rubyx/test/slot_machine/test_slotted.rb

17 lines
430 B
Ruby
Raw Normal View History

2018-05-15 18:29:27 +02:00
require_relative "helper"
module SlotMachine
2020-02-17 08:27:42 +01:00
class TestSlotted < MiniTest::Test
2018-06-16 20:01:15 +02:00
def test_to_s
2020-02-17 08:45:54 +01:00
assert_equal "message.caller" , SlottedMessage.new([:caller]).to_s
2020-02-17 08:27:42 +01:00
end
def test_for_mess
2020-02-17 08:45:54 +01:00
assert_equal 2 , SlottedMessage.new([:caller]).slots_length
2018-06-16 20:01:15 +02:00
end
2020-02-17 08:27:42 +01:00
def test_for_const
2020-02-17 08:45:54 +01:00
slotted = Slotted.for(StringConstant.new("hi") , nil)
2020-02-17 08:27:42 +01:00
assert_equal "StringConstant" , slotted.to_s
2018-05-15 18:29:27 +02:00
end
end
end