Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit f38c305

Browse files
committed
Verify partial doubles by default (dependent)
See rspec/rspec-mocks#1409
1 parent 1624f7b commit f38c305

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

spec/rspec/support/recursive_const_methods_spec.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ class Parent
1212

1313
class Bar < Parent
1414
VAL = 10
15+
def to_str
16+
raise "boom!"
17+
end
1518
end
1619
end
1720

@@ -33,7 +36,6 @@ class Bar < Parent
3336
end
3437

3538
it 'does not blow up on buggy classes that raise weird errors on `to_str`' do
36-
allow(Foo::Bar).to receive(:to_str).and_raise("boom!")
3739
const, _ = recursive_const_defined?('::RSpec::Support::Foo::Bar::VAL')
3840

3941
expect(const).to eq(10)

0 commit comments

Comments
 (0)