Class: Spec::Matchers::PositiveOperatorMatcher
- Inherits:
-
OperatorMatcher
- Object
- OperatorMatcher
- Spec::Matchers::PositiveOperatorMatcher
- Defined in:
- lib/gems/rspec-1.1.12/lib/spec/matchers/operator_matcher.rb
Overview
:nodoc:
Instance Method Summary collapse
Methods inherited from OperatorMatcher
#description, #fail_with_message, get, #initialize, register, registry, use_custom_matcher_or_delegate
Constructor Details
This class inherits a constructor from Spec::Matchers::OperatorMatcher
Instance Method Details
#__delegate_operator(actual, operator, expected) ⇒ Object
50 51 52 53 54 55 56 57 |
# File 'lib/gems/rspec-1.1.12/lib/spec/matchers/operator_matcher.rb', line 50 def __delegate_operator(actual, operator, expected) return true if actual.__send__(operator, expected) if ['==','===', '=~'].include?(operator) ("expected: #{expected.inspect},\n got: #{actual.inspect} (using #{operator})") else ("expected: #{operator} #{expected.inspect},\n got: #{operator.gsub(/./, ' ')} #{actual.inspect}") end end |