Permalink
Browse files

Move all the matcher classes to the RSpec::Matchers::BuiltIn module (so

they don't cloud the Matchers namespace)
  • Loading branch information...
1 parent e031971 commit 536cf9ea390f971c64a52d84bd3385cf55b9601b @dchelimsky dchelimsky committed Jan 12, 2012
Showing with 2,240 additions and 2,195 deletions.
  1. +2 −2 lib/rspec/expectations/handler.rb
  2. +387 −20 lib/rspec/matchers.rb
  3. +0 −56 lib/rspec/matchers/base_matcher.rb
  4. +0 −232 lib/rspec/matchers/be.rb
  5. +0 −24 lib/rspec/matchers/be_instance_of.rb
  6. +0 −24 lib/rspec/matchers/be_kind_of.rb
  7. +0 −47 lib/rspec/matchers/be_within.rb
  8. +25 −0 lib/rspec/matchers/built_in.rb
  9. +58 −0 lib/rspec/matchers/built_in/base_matcher.rb
  10. +183 −0 lib/rspec/matchers/built_in/be.rb
  11. +13 −0 lib/rspec/matchers/built_in/be_instance_of.rb
  12. +13 −0 lib/rspec/matchers/built_in/be_kind_of.rb
  13. +39 −0 lib/rspec/matchers/built_in/be_within.rb
  14. +132 −0 lib/rspec/matchers/built_in/change.rb
  15. +22 −0 lib/rspec/matchers/built_in/cover.rb
  16. +26 −0 lib/rspec/matchers/built_in/eq.rb
  17. +25 −0 lib/rspec/matchers/built_in/eql.rb
  18. +48 −0 lib/rspec/matchers/built_in/equal.rb
  19. +28 −0 lib/rspec/matchers/built_in/exist.rb
  20. +47 −0 lib/rspec/matchers/built_in/has.rb
  21. +107 −0 lib/rspec/matchers/built_in/have.rb
  22. +52 −0 lib/rspec/matchers/built_in/include.rb
  23. +13 −0 lib/rspec/matchers/built_in/match.rb
  24. +52 −0 lib/rspec/matchers/built_in/match_array.rb
  25. +96 −0 lib/rspec/matchers/built_in/raise_error.rb
  26. +73 −0 lib/rspec/matchers/built_in/respond_to.rb
  27. +29 −0 lib/rspec/matchers/built_in/satisfy.rb
  28. +93 −0 lib/rspec/matchers/built_in/throw_symbol.rb
  29. +0 −196 lib/rspec/matchers/change.rb
  30. +0 −36 lib/rspec/matchers/cover.rb
  31. +1 −1 lib/rspec/matchers/dsl.rb
  32. +0 −36 lib/rspec/matchers/eq.rb
  33. +0 −35 lib/rspec/matchers/eql.rb
  34. +0 −58 lib/rspec/matchers/equal.rb
  35. +0 −34 lib/rspec/matchers/exist.rb
  36. +0 −44 lib/rspec/matchers/has.rb
  37. +0 −162 lib/rspec/matchers/have.rb
  38. +0 −66 lib/rspec/matchers/include.rb
  39. +0 −21 lib/rspec/matchers/match.rb
  40. +0 −65 lib/rspec/matchers/match_array.rb
  41. +235 −233 lib/rspec/matchers/matcher.rb
  42. +2 −2 lib/rspec/matchers/method_missing.rb
  43. +19 −20 lib/rspec/matchers/operator_matcher.rb
  44. +0 −116 lib/rspec/matchers/raise_error.rb
  45. +0 −80 lib/rspec/matchers/respond_to.rb
  46. +0 −46 lib/rspec/matchers/satisfy.rb
  47. +0 −112 lib/rspec/matchers/throw_symbol.rb
  48. +1 −2 spec/rspec/matchers/base_matcher_spec.rb
  49. +1 −1 spec/rspec/matchers/change_spec.rb
  50. +4 −6 spec/rspec/matchers/cover_spec.rb
  51. +2 −2 spec/rspec/matchers/have_spec.rb
  52. +307 −309 spec/rspec/matchers/matcher_spec.rb
  53. +2 −2 spec/rspec/matchers/operator_matcher_spec.rb
  54. +103 −105 spec/rspec/matchers/throw_symbol_spec.rb
@@ -4,7 +4,7 @@ class PositiveExpectationHandler
def self.handle_matcher(actual, matcher, message=nil, &block)
::RSpec::Matchers.last_should = :should
::RSpec::Matchers.last_matcher = matcher
- return ::RSpec::Matchers::PositiveOperatorMatcher.new(actual) if matcher.nil?
+ return ::RSpec::Matchers::BuiltIn::PositiveOperatorMatcher.new(actual) if matcher.nil?
match = matcher.matches?(actual, &block)
return match if match
@@ -25,7 +25,7 @@ class NegativeExpectationHandler
def self.handle_matcher(actual, matcher, message=nil, &block)
::RSpec::Matchers.last_should = :should_not
::RSpec::Matchers.last_matcher = matcher
- return ::RSpec::Matchers::NegativeOperatorMatcher.new(actual) if matcher.nil?
+ return ::RSpec::Matchers::BuiltIn::NegativeOperatorMatcher.new(actual) if matcher.nil?
match = matcher.respond_to?(:does_not_match?) ?
!matcher.does_not_match?(actual, &block) :
Oops, something went wrong.

0 comments on commit 536cf9e

Please sign in to comment.