Class: RSpec::Mocks::Matchers::Receive::DefaultDescribable

Inherits:
Object
  • Object
show all
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-mocks-3.12.2/lib/rspec/mocks/matchers/receive.rb

Overview

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

Instance Method Summary collapse

Constructor Details

#initialize(message) ⇒ DefaultDescribable

Returns a new instance of DefaultDescribable.



119
120
121
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-mocks-3.12.2/lib/rspec/mocks/matchers/receive.rb', line 119

def initialize(message)
  @message = message
end

Instance Method Details

#description_for(verb) ⇒ Object

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 :(.



126
127
128
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-mocks-3.12.2/lib/rspec/mocks/matchers/receive.rb', line 126

def description_for(verb)
  "#{verb} #{@message}"
end