Skip to content

Commit dc830ba

Browse files
committed
1 parent 1c5e420 commit dc830ba

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

spec/unit/spec_helper.rb

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,21 @@ module MyLetDeclarations
117117
let(:logger) { Entitlements.dummy_logger }
118118
end
119119

120+
module Contracts
121+
module RSpec
122+
module Mocks
123+
def instance_double(klass, *args)
124+
super.tap do |double|
125+
allow(double).to receive(:is_a?).with(klass).and_return(true)
126+
end
127+
end
128+
end
129+
end
130+
end
131+
120132
RSpec.configure do |config|
121133
config.include MyLetDeclarations
134+
config.include Contracts::RSpec::Mocks
122135

123136
config.before :each do
124137
allow(Time).to receive(:now).and_return(Time.utc(2018, 4, 1, 12, 0, 0))

0 commit comments

Comments
 (0)