Skip to content

Commit

Permalink
Note truncation strategy for DatabaseCleaner.
Browse files Browse the repository at this point in the history
  • Loading branch information
pat committed Jan 18, 2012
1 parent 1e47f05 commit 846c6da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ts/en/testing.textile
Expand Up @@ -48,7 +48,7 @@ Feature: Searching for articles

The reason for this is that while ActiveRecord can run all its operations within a single transaction, Sphinx doesn't have access to that, and so indexing will not include your transaction's changes.

The added complication to this is that you'll probably want to clear all the data from your database between scenarios. This can be done within the @Before@ block, in one of your steps files (see below). Another option is Ben Mabey's "Database Cleaner":http://github.com/bmabey/database_cleaner library.
The added complication to this is that you'll probably want to clear all the data from your database between scenarios. This can be done within the @Before@ block, in one of your steps files (see below). Another option is Ben Mabey's "Database Cleaner":http://github.com/bmabey/database_cleaner library - and make sure you use the truncation strategy.

{% highlight ruby %}
Before do
Expand Down

0 comments on commit 846c6da

Please sign in to comment.