class AllMatcherTest
Public Instance Methods
setup()
click to toggle source
# File test/unit/matcher_test.rb, line 46 def setup @matcher = StateMachine::AllMatcher.instance end
test_should_always_match()
click to toggle source
# File test/unit/matcher_test.rb, line 54 def test_should_always_match [nil, :parked, :idling].each {|value| assert @matcher.matches?(value)} end
test_should_generate_blacklist_matcher_after_subtraction()
click to toggle source
# File test/unit/matcher_test.rb, line 62 def test_should_generate_blacklist_matcher_after_subtraction matcher = @matcher - [:parked, :idling] assert_instance_of StateMachine::BlacklistMatcher, matcher assert_equal [:parked, :idling], matcher.values end
test_should_have_a_description()
click to toggle source
# File test/unit/matcher_test.rb, line 68 def test_should_have_a_description assert_equal 'all', @matcher.description end
test_should_have_no_values()
click to toggle source
# File test/unit/matcher_test.rb, line 50 def test_should_have_no_values assert_equal [], @matcher.values end
test_should_not_filter_any_values()
click to toggle source
# File test/unit/matcher_test.rb, line 58 def test_should_not_filter_any_values assert_equal [:parked, :idling], @matcher.filter([:parked, :idling]) end