Skip to content

v1.1 Release

Latest
Compare
Choose a tag to compare
@brrygrdn brrygrdn released this 04 Apr 13:20

This release adds the ability to set a per model threshold to allow a permitted number of seed rows.

Setting thresholds for Models

You may have some models you would like to report on, but which should also have
entries in the database, for example a table that is seeded or loaded with fixtures.
In order to allow this you can provide a threshold for a Model, which is the
maximum number of entries allowed in the database for the Model before it is
regarded as leaky.

To provide a threshold for a Model, you can can the following:

config.after(:all) do
  # Perform the report after each example group
  DatabasePlumber.inspect model_thresholds: { Bar => 3 }
end

Thanks @srushe!