[LRUG] Beginning Rails in 2012
Sam Livingston-Gray
geeksam at gmail.com
Thu Mar 15 12:12:19 PDT 2012
+1 for the Cucumber book; it has a ton of great advice on writing
acceptance tests that don't suck, and some good tips for working with
the actual tools.
As for Cucumber itself, I can recommend it only with the caveat that
Cucumber will lead you down a garden path, pointing out interesting
flora along the way, until one day you look around and realize that
you're standing by yourself in the middle of a giant blackberry bush
of your own creation.
Sorry for the metaphor, but I literally just got done explaining to
our product owner where we went wrong in a former project, and I'm a
little foamy at the mouth. ;> TL;DR: pay attention to the bits in
the Cucumber book where they talk about organizing the code in your
step definitions. Moving methods out into mixin modules is the bare
minimum everyone should be doing; if you're spectacularly
anal-retentive, you might want to check out Kookaburra, a framework I
co-developed.
Links:
http://johnwilger.com/blog/2012/01/21/acceptance-and-integration-testing-with-kookaburra/
http://johnwilger.com/blog/2012/03/10/kookaburra-rewrite-for-0-dot-15-dot-1/
https://github.com/jwilger/kookaburra
Oh, and speaking of foaming at the mouth, I'm also not a huge fan of
RSpec's ".should" style of matching, as you might be able to tell from
this: https://github.com/geeksam/cordon
That being said, RSpec does have a lot of other features that, when
used in moderation, can help make one's test suite a thing of beauty.
As for TDD/BDD, Kent Beck's "TDD By Example," while nearly ten years
old, is still an excellent resource if you're not already a convert to
the red/green/refactor workflow.
-Sam
On Thu, Mar 15, 2012 at 11:21 AM, Erich Kaderka <erich.kaderka at gmail.com> wrote:
> Hi,
>
> there is a book about Cucumber with Capybara
>
> http://pragprog.com/book/hwcuc/the-cucumber-book
>
> Erich
> On 15 Mar 2012, at 18:16, luke saunders wrote:
>
>> On Thu, Mar 15, 2012 at 6:01 PM, Tom Armitage <tom at infovore.org> wrote:
>>>
>>> Where, say, would you point as a starting point for testing/BDD in
>>> Ruby, given "four years of the mailing list and user group" isn't
>>> enough?
>>
>> I recently read the RSpec book (
>> http://www.amazon.co.uk/RSpec-Book-Behaviour-Development-Cucumber/dp/1934356379
>> ) as I was looking for some best practices around Cucumber and RSpec.
>> It seemed like it would be a good intro to BDD/TDD. The only problem
>> was that it's a year or two old and so doesn't talk about newer
>> developments like Capybara, but useful all the same.
More information about the Chat
mailing list