When running a scenario with the @javascript tag, Capybara will fire up a web server in the same process in a separate thread to your cukes. By default, this means ActiveRecord will give it a separate database connection, which in turn means data you put into your database from Cucumber step definitions (e.g. using FactoryGirl) won't be visible to the web server until the database transaction is committed.
So if you use a transaction strategy for cleaning up your database at the end of a scenario, it won't work for javascript scenarios by default.
There are two ways around this. One is to switch to a truncation strategy for javascript scenarios. This is slower, but more reliable.
The alternative is to patch ActiveRecord to share a single database connection between threads. This means you still get the speed benefits of using a transaction to roll back your database, but you run the risk of the two threads stomping on one another as they talk to the database.
Right now, the default behavior is to use truncation, but you can override this by telling cucumber-rails which strategy to use for javascript scenarios.
The deletion strategy can be quicker for situations where truncation causes locks which has been reported by some Oracle users.