Class: Spec::Matchers::PositiveOperatorMatcher
- Inherits:
-
BaseOperatorMatcher
- Object
- BaseOperatorMatcher
- Spec::Matchers::PositiveOperatorMatcher
- Defined in:
- lib/spec/matchers/operator_matcher.rb
Overview
:nodoc:
Instance Method Summary collapse
Methods inherited from BaseOperatorMatcher
#<, #<=, #==, #===, #=~, #>, #>=, #fail_with_message, #initialize
Constructor Details
This class inherits a constructor from Spec::Matchers::BaseOperatorMatcher
Instance Method Details
#__delegate_method_missing_to_target(operator, expected) ⇒ Object
52 53 54 55 56 57 |
# File 'lib/spec/matchers/operator_matcher.rb', line 52 def __delegate_method_missing_to_target(operator, expected) ::Spec::Matchers.generated_description = "should #{operator} #{expected.inspect}" return if @target.send(operator, expected) return ("expected: #{expected.inspect},\n got: #{@target.inspect} (using #{operator})") if ['==','===', '=~'].include?(operator) return ("expected: #{operator} #{expected.inspect},\n got: #{operator.gsub(/./, ' ')} #{@target.inspect}") end |