Closed raoehtesham03 closed 9 months ago
In the same example you should at least call Asset.transaction. Your example must be incomplete if it says that it did indeed yield once.
Are you certain that and_yield
works with countable specifiers? http://rspec.info/features/3-12/rspec-mocks/configuring-responses/yielding/
https://github.com/rspec/rspec-mocks/blob/main/spec/rspec/mocks/and_yield_spec.rb
Counts in this case are about how many times the method was called, not how many times it yielded.
Your environment
Expected behavior
Actual behavior