method
__delegate_method_missing_to_target

1.1.4 -
Show latest stable
-
0 notes -
Class: Spec::Matchers::PositiveOperatorMatcher
- 1.1.4 (0)
- 1.1.12
- 1.2.0
- 1.2.8
- 1.3.0
- 1.3.1
- What's this?
__delegate_method_missing_to_target(operator, expected)
public
Hide source
# File lib/spec/matchers/operator_matcher.rb, line 53 def __delegate_method_missing_to_target(operator, expected) ::Spec::Matchers.generated_description = "should #{operator} #{expected.inspect}" return if @target.send(operator, expected) return fail_with_message("expected: #{expected.inspect},\n got: #{@target.inspect} (using #{operator})") if ['==','===', '=~'].include?(operator) return fail_with_message("expected: #{operator} #{expected.inspect},\n got: #{operator.gsub(/./, ' ')} #{@target.inspect}") end