lib/rspec/matchers/operator_matcher.rb in rspec-expectations-2.0.0.beta.8 vs lib/rspec/matchers/operator_matcher.rb in rspec-expectations-2.0.0.beta.9

- old
+ new

@@ -1,6 +1,6 @@ -module Rspec +module RSpec module Matchers class OperatorMatcher class << self def registry @@ -22,11 +22,11 @@ end def self.use_custom_matcher_or_delegate(operator) define_method(operator) do |expected| if matcher = OperatorMatcher.get(@actual.class, operator) - @actual.send(::Rspec::Matchers.last_should, matcher.new(expected)) + @actual.send(::RSpec::Matchers.last_should, matcher.new(expected)) else eval_match(@actual, operator, expected) end end end @@ -34,20 +34,20 @@ ['==', '===', '=~', '>', '>=', '<', '<='].each do |operator| use_custom_matcher_or_delegate operator end def fail_with_message(message) - Rspec::Expectations.fail_with(message, @expected, @actual) + RSpec::Expectations.fail_with(message, @expected, @actual) end def description "#{@operator} #{@expected.inspect}" end private def eval_match(actual, operator, expected) - ::Rspec::Matchers.last_matcher = self + ::RSpec::Matchers.last_matcher = self @operator, @expected = operator, expected __delegate_operator(actual, operator, expected) end end