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