rubyx/test/mom/instruction/test_slot_definition.rb

21 lines
450 B
Ruby
Raw Normal View History

2018-05-15 18:29:27 +02:00
require_relative "helper"
module Mom
class TestSlotDefinitionBasics < MiniTest::Test
def slot(slot = :caller)
SlotDefinition.new(:message , slot)
end
def test_create_ok1
assert_equal :message , slot.known_object
end
def test_create_ok2
assert_equal Array , slot.slots.class
assert_equal :caller , slot.slots.first
end
def test_create_fail_none
assert_raises {slot(nil)}
end
end
end