Class: Surrogate::RSpec::NounMatcher::FailureMessageShouldNotWith
- Inherits:
-
AbstractFailureMessage
- Object
- AbstractFailureMessage
- Surrogate::RSpec::NounMatcher::FailureMessageShouldNotWith
- Defined in:
- lib/surrogate/rspec/noun_matcher.rb
Instance Attribute Summary
Attributes inherited from AbstractFailureMessage
#invocations, #method_name, #times_predicate, #with_filter
Instance Method Summary collapse
Methods inherited from AbstractFailureMessage
#expected_invocation, #expected_times_invoked, #initialize, #inspect_arguments, #times_invoked, #times_msg
Constructor Details
This class inherits a constructor from Surrogate::RSpec::AbstractFailureMessage
Instance Method Details
#get_message ⇒ Object
49 50 51 52 53 54 55 56 57 |
# File 'lib/surrogate/rspec/noun_matcher.rb', line 49 def = "should not have been asked for its #{ method_name } with #{ inspect_arguments expected_invocation }, but " if times_invoked.zero? << "was never asked" else inspected_invocations = invocations.map { |invocation| inspect_arguments invocation } << "got #{inspected_invocations.join ', '}" end end |