Hi,
I was looking at the docs, specifically
https://relishapp.com/rspec/rspec-mocks/docs/old-syntax/any-instance
https://relishapp.com/rspec/rspec-mocks/docs/working-with-legacy-code/any-instance
I agree that it's a design smell, but I want to suggest an example. I
couldn't find out how to contribute to the documentation hence posting here.
I was just thinking a better example as an alternative would be
RSpec.describe User, type: :model do
subject(:user){ User.new }
before(:each) do
allow(user).to receive(:foo).and_return("bar")
end
--
You received this message because you are subscribed to the Google Groups
"rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rspec/a725b287-f0ac-4315-83ca-c4ab9c03ba05%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.