/lib/gemcache/ruby/1.9.1/gems/state_machine-1.1.2/test/unit/matcher_helpers_test.rb

https://bitbucket.org/technopunk2099/metasploit-framework · Ruby · 37 lines · 28 code · 9 blank · 0 comment · 0 complexity · f8abde404bf8a232e0f3d371dbf7a446 MD5 · raw file

  1. require File.expand_path(File.dirname(__FILE__) + '/../test_helper')
  2. class MatcherHelpersAllTest < Test::Unit::TestCase
  3. include StateMachine::MatcherHelpers
  4. def setup
  5. @matcher = all
  6. end
  7. def test_should_build_an_all_matcher
  8. assert_equal StateMachine::AllMatcher.instance, @matcher
  9. end
  10. end
  11. class MatcherHelpersAnyTest < Test::Unit::TestCase
  12. include StateMachine::MatcherHelpers
  13. def setup
  14. @matcher = any
  15. end
  16. def test_should_build_an_all_matcher
  17. assert_equal StateMachine::AllMatcher.instance, @matcher
  18. end
  19. end
  20. class MatcherHelpersSameTest < Test::Unit::TestCase
  21. include StateMachine::MatcherHelpers
  22. def setup
  23. @matcher = same
  24. end
  25. def test_should_build_a_loopback_matcher
  26. assert_equal StateMachine::LoopbackMatcher.instance, @matcher
  27. end
  28. end