| To your issues: 1) Yeah, organization is crazy. I think the method comparison is a bit unfair though. In theory, each step should be easily identifiable (like a method) but this is rarely the case given that most steps have complex regex matching (sometimes for grammatical niceness - e.g. (a vs. an), sometimes for other crazy town reasons). This makes not only automated indexing difficult (RubyMine tries...) but trying to keep hundreds of steps in your head is pretty hard. Especially one's you probably didn't write. The cool thing about steak is that helpers and "reusable steps" are actually just methods! Hello ctags :D b) Our case was: And the user "212-555-1234" should receive a text with:
| Some "double quoted" and 'single quoted' text |
Definitely possible in cucumber, but I prefer a string equality assertion: text.should == "..." (you have to do this anyway in the step_definition)
c) Ben Maeby's email_spec is awesome and provides some steps for clicking on links in email. I still use the library in steak (just the raw rspec matchers though).The trouble is you have a url: http://coolsite.org/something/abcde22424aw3324234
The matcher provided says:I click on the link "Link Title or URL". Since the token is random every time (unless you stub it, which is kinda out of the spirit of acceptance testing, but that's another debate) it's hard to say "Click on the link with the big ass token in it". You can definitely write a step like: And I visit the account confirmation link
Again, a matter of preference for abstracting the step with one-time use, highly coupled text to code vs. a comment and the code together. The actual mechanics are the same in both systems, it's just that cucumber hides them in a one-time use step away from the actual feature whereas the steak is inline.d) Similar to the above, the catch all step can work in cucumber. Though, in a few scenarios, it's desirable to run only specific jobs or more often in our case, to check if jobs are scheduled in a specific way. It avoids the weird scenario of writing a step definition like "And I run only the blah jobs" or "And a blah job should be scheduled with ...". Ideally the job system would be decoupled entirely from the acceptance test, but we can't all do cool stuff like this all the time: http://corner.squareup.com/2010/08/cucumber-and-resque.html |