Explain difference between Capybara's negative matchers and should_not #26

Merged
merged 1 commit into from Nov 2, 2011

2 participants

@edzhelyov

I have added an explanation why you should use Capybara's matchers in the acceptance tests.

But why you should prefer to use the capybara matchers in the view tests ?

They wait for a given timeout before returning false and this make ajax/javascript actions possible to test, but I think in the view test you don't need that.
I was going to change the "prefer" to "always", but I don't see why you should do it, maybe only for consistency with the acceptance ones.

Don't you have duplication in the acceptance and view tests ? The view is simple template and you will test the behavior in the acceptance test anyway, everything else that need unit testing will be in helpers and modules, so I don't see the value in testing the views.

@bbatsov bbatsov merged commit 659d31a into bbatsov:master Nov 2, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment