I wrote the following test in rspec:
expect { ... }.to change( User.where(:profile.exists => true), :count ).by(1)
but this area is executed only once, and it always has the same array with the same size. How to force rspec to execute this area before and after running the expected code?
source share