[rspec-users] [Cucumber] cucumber command does not work in db transaction
joe at josephwilk.net
Thu Jan 29 07:50:48 EST 2009
Juanma Cervera wrote:
> I am working in an scenario and it's still failing. I have not yet
> finished it.
> And I am running it constantly with the cucumber command, not with rake.
> The problem is that it's not working with the database in a transaction,
> and I have to run 'rake db:test:prepare' manually between two sequential
> runs of cucumber.
> rake features, make db:test:prepare automatically.
> But cucumber no.
> Isn't it a bug or it's correct? and I have to delete my data each time
> when using cucumber command.
> Juanma Cervera
Do you have:
Cucumber::Rails.use_transactional_fixtures = true
In your env.rb?
If you are using a browser based testing tool such as Selenium or Watir
you have to deal with the clean-up yourself (using Cucumber's hooks:
More information about the rspec-users