class BlacklistMatcherTest
Public Instance Methods
setup()
click to toggle source
# File test/unit/matcher_test.rb, line 103 def setup @matcher = StateMachine::BlacklistMatcher.new([:parked, :idling]) end
test_should_filter_known_values()
click to toggle source
# File test/unit/matcher_test.rb, line 111 def test_should_filter_known_values assert_equal [:first_gear], @matcher.filter([:parked, :idling, :first_gear]) end
test_should_have_a_description()
click to toggle source
# File test/unit/matcher_test.rb, line 123 def test_should_have_a_description assert_equal 'all - [:parked, :idling]', @matcher.description matcher = StateMachine::BlacklistMatcher.new([:parked]) assert_equal 'all - :parked', matcher.description end
test_should_have_values()
click to toggle source
# File test/unit/matcher_test.rb, line 107 def test_should_have_values assert_equal [:parked, :idling], @matcher.values end
test_should_match_unknown_values()
click to toggle source
# File test/unit/matcher_test.rb, line 115 def test_should_match_unknown_values assert @matcher.matches?(:first_gear) end
test_should_not_match_known_values()
click to toggle source
# File test/unit/matcher_test.rb, line 119 def test_should_not_match_known_values assert !@matcher.matches?(:parked) end