Sha256: ab517354e780615a7ab849dc843dd07a250b796a2ccac3a4958f4cea8885809e

Contents?: true

Size: 1.17 KB

Versions: 7061

Compression:

Stored size: 1.17 KB

Contents

module RSpec
  module Mocks
    module AnyInstance
      # @private
      class ErrorGenerator < ::RSpec::Mocks::ErrorGenerator
        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

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

        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

        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
      end

      def self.error_generator
        @error_generator ||= ErrorGenerator.new
      end
    end
  end
end

Version data entries

7,061 entries across 6,974 versions & 125 rubygems

Version Path
mux_ruby-3.20.0 vendor/bundle/ruby/3.2.0/gems/rspec-mocks-3.11.1/lib/rspec/mocks/any_instance/error_generator.rb
cybrid_api_bank_ruby-0.123.12 vendor/bundle/ruby/3.3.0/gems/rspec-mocks-3.13.2/lib/rspec/mocks/any_instance/error_generator.rb
cybrid_api_organization_ruby-0.123.12 vendor/bundle/ruby/3.3.0/gems/rspec-mocks-3.13.2/lib/rspec/mocks/any_instance/error_generator.rb
cybrid_api_id_ruby-0.123.12 vendor/bundle/ruby/3.3.0/gems/rspec-mocks-3.13.2/lib/rspec/mocks/any_instance/error_generator.rb
cybrid_api_bank_ruby-0.123.11 vendor/bundle/ruby/3.3.0/gems/rspec-mocks-3.13.2/lib/rspec/mocks/any_instance/error_generator.rb
cybrid_api_organization_ruby-0.123.11 vendor/bundle/ruby/3.3.0/gems/rspec-mocks-3.13.2/lib/rspec/mocks/any_instance/error_generator.rb
cybrid_api_id_ruby-0.123.11 vendor/bundle/ruby/3.3.0/gems/rspec-mocks-3.13.2/lib/rspec/mocks/any_instance/error_generator.rb
cybrid_api_id_ruby-0.123.10 vendor/bundle/ruby/3.3.0/gems/rspec-mocks-3.13.2/lib/rspec/mocks/any_instance/error_generator.rb
cybrid_api_bank_ruby-0.123.10 vendor/bundle/ruby/3.3.0/gems/rspec-mocks-3.13.2/lib/rspec/mocks/any_instance/error_generator.rb
cybrid_api_organization_ruby-0.123.10 vendor/bundle/ruby/3.3.0/gems/rspec-mocks-3.13.2/lib/rspec/mocks/any_instance/error_generator.rb
cybrid_api_organization_ruby-0.123.7 vendor/bundle/ruby/3.3.0/gems/rspec-mocks-3.13.2/lib/rspec/mocks/any_instance/error_generator.rb
cybrid_api_id_ruby-0.123.7 vendor/bundle/ruby/3.3.0/gems/rspec-mocks-3.13.2/lib/rspec/mocks/any_instance/error_generator.rb
cybrid_api_bank_ruby-0.123.7 vendor/bundle/ruby/3.3.0/gems/rspec-mocks-3.13.2/lib/rspec/mocks/any_instance/error_generator.rb
ory-client-1.15.12 vendor/bundle/ruby/3.1.0/gems/rspec-mocks-3.13.2/lib/rspec/mocks/any_instance/error_generator.rb
cybrid_api_bank_ruby-0.123.4 vendor/bundle/ruby/3.3.0/gems/rspec-mocks-3.13.2/lib/rspec/mocks/any_instance/error_generator.rb
cybrid_api_id_ruby-0.123.4 vendor/bundle/ruby/3.3.0/gems/rspec-mocks-3.13.2/lib/rspec/mocks/any_instance/error_generator.rb
cybrid_api_organization_ruby-0.123.4 vendor/bundle/ruby/3.3.0/gems/rspec-mocks-3.13.2/lib/rspec/mocks/any_instance/error_generator.rb
cybrid_api_bank_ruby-0.123.3 vendor/bundle/ruby/3.3.0/gems/rspec-mocks-3.13.2/lib/rspec/mocks/any_instance/error_generator.rb
cybrid_api_organization_ruby-0.123.3 vendor/bundle/ruby/3.3.0/gems/rspec-mocks-3.13.2/lib/rspec/mocks/any_instance/error_generator.rb
cybrid_api_id_ruby-0.123.3 vendor/bundle/ruby/3.3.0/gems/rspec-mocks-3.13.2/lib/rspec/mocks/any_instance/error_generator.rb