jejacks0n / teaspoon

Teaspoon: Javascript test runner for Rails. Use Selenium, BrowserStack, or PhantomJS.
1.43k stars 243 forks source link

Add note about integrating with Database Cleaner to the Readme #257

Closed taboularasa closed 10 years ago

taboularasa commented 10 years ago

Hello, I suggest adding a note about integrating Database Cleaner (or something like it) to the Readme. I spent quite some time before I realized how simple it was to integrate using hooks.

jejacks0n commented 10 years ago

Probably best to leave it out. In general I think data should be mocked, and the server shouldn't be accessed from JavaScript specs.

At the same time, I know there are reasons to deviate from that, so I want it to be supported, but I don't want it to give people more rope.

taboularasa commented 10 years ago

@jejacks0n Do you think the server should be mocked even in integration / feature specs?

jayzes commented 10 years ago

@taboularasa no, that's fine in integration specs...but Teaspoon isn't really a tool for those. Capybara and the like are much better suited for integration testing than Jasmine/Mocha/QUnit.

taboularasa commented 10 years ago

@jayzes thanks for the feedback. Just curious, would you still consider Capybara the preferable tool for driving the UI in the case of an Ember / Rails app? I've always found Capybara's handling of async timing issues a bit of a pain and I was under the impression that Ember's test helpers have a better handle on that situation