Sha256: f37359e7436fdfd20a5e629685cb03bca1afaffbbbf7eac39792569a789f44f7
Contents?: true
Size: 794 Bytes
Versions: 14
Compression:
Stored size: 794 Bytes
Contents
require_relative '../../test_helper' class BlacklistMatcherTest < StateMachinesTest def setup @matcher = StateMachines::BlacklistMatcher.new([:parked, :idling]) end def test_should_have_values assert_equal [:parked, :idling], @matcher.values end def test_should_filter_known_values assert_equal [:first_gear], @matcher.filter([:parked, :idling, :first_gear]) end def test_should_match_unknown_values assert @matcher.matches?(:first_gear) end def test_should_not_match_known_values refute @matcher.matches?(:parked) end def test_should_have_a_description assert_equal 'all - [:parked, :idling]', @matcher.description matcher = StateMachines::BlacklistMatcher.new([:parked]) assert_equal 'all - :parked', matcher.description end end
Version data entries
14 entries across 14 versions & 2 rubygems