class RSpec::Mocks::Matchers::Receive::DefaultDescribable

MessageExpectation objects are able to describe themselves in detail. We use this as a fall back when a MessageExpectation is not available. @private

Public Class Methods

new(message) click to toggle source
# File lib/rspec/mocks/matchers/receive.rb, line 118
def initialize(message)
  @message = message
end

Public Instance Methods

description_for(verb) click to toggle source

This is much simpler for the `any_instance` case than what the user may want, but I'm not up for putting a bunch of effort into full descriptions for `any_instance` expectations at this point :(.

# File lib/rspec/mocks/matchers/receive.rb, line 125
def description_for(verb)
  "#{verb} #{@message}"
end