- Add ability to ignore queries cached by the ORM with the new option
ignore_cached_queries
(@gagalago)
- Recognize private
#populate
and#warmup
methods in Minitest classes. (@palkan)
- Added ability to specify the exact number of expected queries when using constant matchers. (@akostadinov, @palkan)
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
- Require Ruby 2.7+.
- Fix .ignore setting (.ignore setting was ignored by the Collector ;-))
- Fix rspec matchers to allow expectations inside execution block
- Ruby 3.0 compatibility. (@palkan)
- Fix table stats summary when queries use backticks to surround table names (@andrewhampton)
- Add support to test for linear query. (@caalberts)
-
Ruby 2.5+ is required. (@palkan)
-
Add support for multiple backtrace lines in verbose output. (@palkan)
Could be specified via NPLUSONE_BACKTRACE
env var.
-
Add
NPLUSONE_TRUNCATE
env var to truncate queries in verbose mode. (@palkan) -
Support passing default filter via
NPLUSONE_FILTER
env var. (@palkan) -
Add location tracing to SQLs in verbose mode. (@palkan)
- Enhance failure message by showing differences in table hits. (@palkan)
-
Make scale factor available in tests via
#current_scale
method. (@Earendil95) -
Start keeping a changelog. (@palkan)