rspec-core: doubles and around hook failure
Hi,
The following raises Failure/Error: double('test').as_null_object The use of doubles or partial doubles from rspec-mocks outside of the per-test lifecycle is not supported.
context "test" do
around(:each) do |example|
double('test').as_null_object
example.run
end
it "foo" do
end
end
Works with a before hook though.
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Comments: 15 (8 by maintainers)
OK, then you can define an extra rspec-mock scope for your
aroundhook:Or use something besides
doubleas replacement for thefoohere.