123456789_123456789_123456789_123456789_123456789_

Class: RSpec::Mocks::AnyInstance::ErrorGenerator Private

Do not use. This class is for internal use only.
Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: RSpec::Mocks::ErrorGenerator
Defined in: rspec-mocks/lib/rspec/mocks/any_instance/error_generator.rb

Class Method Summary

Instance Attribute Summary

Instance Method Summary

::RSpec::Mocks::ErrorGenerator - Inherited

Instance Method Details

#raise_does_not_implement_error(klass, method_name)

[ GitHub ]

  
# File 'rspec-mocks/lib/rspec/mocks/any_instance/error_generator.rb', line 11

def raise_does_not_implement_error(klass, method_name)
  __raise "#{klass} does not implement ##{method_name}"
end

#raise_message_already_received_by_other_instance_error(method_name, object_inspect, invoked_instance)

[ GitHub ]

  
# File 'rspec-mocks/lib/rspec/mocks/any_instance/error_generator.rb', line 15

def raise_message_already_received_by_other_instance_error(method_name, object_inspect, invoked_instance)
  __raise "The message '#{method_name}' was received by #{object_inspect} " \
          "but has already been received by #{invoked_instance}"
end

#raise_not_supported_with_prepend_error(method_name, problem_mod)

[ GitHub ]

  
# File 'rspec-mocks/lib/rspec/mocks/any_instance/error_generator.rb', line 20

def raise_not_supported_with_prepend_error(method_name, problem_mod)
  __raise "Using `any_instance` to stub a method (#{method_name}) that has been " \
          "defined on a prepended module (#{problem_mod}) is not supported."
end

#raise_second_instance_received_message_error(unfulfilled_expectations)

[ GitHub ]

  
# File 'rspec-mocks/lib/rspec/mocks/any_instance/error_generator.rb', line 6

def raise_second_instance_received_message_error(unfulfilled_expectations)
  __raise "Exactly one instance should have received the following " \
          "message(s) but didn't: #{unfulfilled_expectations.sort.join(', ')}"
end