Sha256: e938d51c41ad8c6694393a016bb9db8440238a2ff2d8b8b306896585d5529347

Contents?: true

Size: 757 Bytes

Versions: 11

Compression:

Stored size: 757 Bytes

Contents

require 'spec_helper'

module RSpec
  module Mocks
    describe Configuration do
      let(:config) { Configuration.new }
      let(:mod_1)  { Module.new }
      let(:mod_2)  { Module.new }

      def instance_methods_of(mod)
        mod_1.instance_methods.map(&:to_sym)
      end

      it 'adds stub and should_receive to the given modules' do
        expect(instance_methods_of(mod_1)).not_to include(:stub, :should_receive)
        expect(instance_methods_of(mod_2)).not_to include(:stub, :should_receive)

        config.add_stub_and_should_receive_to(mod_1, mod_2)

        expect(instance_methods_of(mod_1)).to include(:stub, :should_receive)
        expect(instance_methods_of(mod_2)).to include(:stub, :should_receive)
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 6 rubygems

Version Path
judge-2.0.5 vendor/bundle/ruby/2.1.0/gems/rspec-mocks-2.13.0/spec/rspec/mocks/configuration_spec.rb
sshp-0.0.2 vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/configuration_spec.rb
sshp-0.0.1 vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/configuration_spec.rb
sidekiq-statsd-0.1.1 vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/configuration_spec.rb
sidekiq-statsd-0.1.0 vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/configuration_spec.rb
rspec-mocks-2.13.1 spec/rspec/mocks/configuration_spec.rb
vagrant-actionio-0.0.9 vendor/bundle/gems/rspec-mocks-2.13.0/spec/rspec/mocks/configuration_spec.rb
rspec-mocks-2.13.0 spec/rspec/mocks/configuration_spec.rb
remq-0.0.4 vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/configuration_spec.rb
remq-0.0.3 vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/configuration_spec.rb
rspec-mocks-2.12.2 spec/rspec/mocks/configuration_spec.rb