Sha256: f4743f9f2f503a345473f05e6e5c7b6212a68ad21cd7208a6d2c08cbffaf0f76

Contents?: true

Size: 595 Bytes

Versions: 5

Compression:

Stored size: 595 Bytes

Contents

# frozen_string_literal: true

module RSpec
  module Mock
    class Context
      include RSpec::Mocks::ExampleMethods
      include RSpec::Matchers

      def initialize(example_group)
        @example_group = example_group
      end

      def method_missing(method, *args, &block)
        if @example_group.respond_to?(method)
          @example_group.send(method, *args, &block)
        else
          super
        end
      end

      def respond_to_missing?(method, include_private = false)
        @example_group.respond_to?(method, include_private) || super
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rspec-mock-0.4.0 lib/rspec/mock/context.rb
rspec-mock-0.3.1 lib/rspec/mock/context.rb
rspec-mock-0.3.0 lib/rspec/mock/context.rb
rspec-mock-0.2.0 lib/rspec/mock/context.rb
rspec-mock-0.1.0 lib/rspec/mock/context.rb