O'Reilly logo

Rails 4 Test Prescriptions by Noel Rappin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Is Cucumber Worth It?

That depends on what “it” is. Cucumber is a very helpful acceptance-test framework, provided your expectations of it are reasonable. It’s a lousy unit-test framework, and if you try to use it for unit testing you will hate it and possibly stop eating salads to avoid cucumbers, which is bad for your health.

I use Cucumber for the relatively minimal goals of a) being able to write my integration tests at the level of user behavior and b) being able to easily separate my slower integration tests from my faster unit tests. For those things, it works great.

You will sometimes hear that Cucumber allows for nondeveloper members of your team to participate in the acceptance-testing process because Cucumber is natural-language-like. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required