Sha256: 86d387154c1c3dc38b631c6733f8e4f4f9027dd7c5c056eda35ed76396f094cb
Contents?: true
Size: 613 Bytes
Versions: 14
Compression:
Stored size: 613 Bytes
Contents
require_relative '../../test_helper' class Validateable class << self def validate(*args, &block) args << block if block_given? args end end end class StateContextTest < StateMachinesTest def setup @klass = Class.new(Validateable) @machine = StateMachines::Machine.new(@klass, initial: :parked) @state = @machine.state :parked @state_context = StateMachines::StateContext.new(@state) end def test_should_have_a_machine assert_equal @machine, @state_context.machine end def test_should_have_a_state assert_equal @state, @state_context.state end end
Version data entries
14 entries across 14 versions & 2 rubygems