Changes
- Ruby 2.7+ is required.
Features
- Added ability to specify the exact number of expected queries when using constant matchers.
For RSpec, you can add the .exactly
modifier:
expect { get :index }.to perform_constant_number_of_queries.exactly(1)
For Minitest, you can provide the expected number of queries as the first argument:
assert_perform_constant_number_of_queries(0, **options) do
get :index
end