small medium large xlarge

Generic-user-small
29 Oct 2011, 14:05
Andy Waite (4 posts)

Just reading the new chapter about Databases. It feels like a lot of effort to spend 6 pages refactoring the example from the previous chapter, rather than creating a simple standalone example. People might even choose to skip that previous chapter, since apps which use a databases tend to be more common than those which use a message queue.

Also, this really confused me:

“Capybara actually runs the web server in a separate thread within the same process, so you might think Cucumber and the web server share the same database connection. In fact they don’t—each thread also gets its own database connection, which means transactional cleaning won’t work. It obscures data from the other connection.”.

I’m pretty sure I’ve successfully used the Transaction approach with Rails/Capybara before. Isn’t that what the cucumber-rails generator defaults to?

Aslak_devil_pragsmall
31 Oct 2011, 12:25
Aslak Hellesøy (17 posts)

Thanks for your feedback Andy.

I’ll think about creating a standalone example. It might be just as much work actually.

Regarding the transactional approach - the book is a little ahead of the codebase actually. I plan to close this ticket before the book goes to print: https://github.com/cucumber/cucumber-rails/issues/166 That would cause transactions not to work in a Capybara+Selenium environment. If you disagree with this, please comment on that ticket.

You must be logged in to comment