Sha256: 58f9c4dc224943e4eb6a8c8e556f91d4b28ffb318832e372cce2bdb57832f862
Contents?: true
Size: 469 Bytes
Versions: 14
Compression:
Stored size: 469 Bytes
Contents
require_relative '../../test_helper' class StateWithMatcherTest < StateMachinesTest def setup @klass = Class.new @args = nil @machine = StateMachines::Machine.new(@klass) @machine.states << @state = StateMachines::State.new(@machine, :parked, if: lambda { |value| value == 1 }) end def test_should_not_match_actual_value refute @state.matches?('parked') end def test_should_match_evaluated_block assert @state.matches?(1) end end
Version data entries
14 entries across 14 versions & 2 rubygems