Add note about resetting PaperTrail between tests.

This commit is contained in:
Andy Stewart 2011-11-09 12:04:41 +01:00
parent 107b8dd2b1
commit 73f6ae3054
1 changed files with 11 additions and 0 deletions

View File

@ -633,6 +633,17 @@ Please see the `rails2` branch.
PaperTrail uses Bundler to manage its dependencies (in development and testing). You can run the tests with `bundle exec rake test`. (You may need to `bundle install` first.)
It's a good idea to reset PaperTrail before each test so data from one test doesn't spill over another. For example:
RSpec.configure do |config|
config.before :each do
PaperTrail.controller_info = {}
PaperTrail.whodunnit = nil
end
end
You may want to turn PaperTrail off to speed up your tests. See the "Turning PaperTrail Off/On" section above.
## Articles