3 ms·
yeah, I think the code examples are contrived, but I don't think that's enough to just jump to "your cukes suck," guess I shouldn't be surprised to find a knee-
by _stfu_donnie 13y ago
yeah, I think the code examples are contrived, but I don't think that's enough to just jump to "your cukes suck," guess I shouldn't be surprised to find a knee-jerk reaction like that on HN.
The damn example you posted at the end of an RSpec test that has a bunch of defined methods IS EXACTLY WHAT THE AUTHOR IS SAYING!
"Cucumber is just a way to wrap RSpec tests with a non-technical syntax. Any supposed benefits of it go to waste because code is only interesting to those who are working in it. Quit writing cukes unless you can honestly say that there is someone reading them who would not understand pure Ruby."
Who exactly are you arguing against?
- karmajunkie 13y agoThe authors argument is "You can do this with another tool so tool X is a bad idea." I disagree. The language behind testing is important. When you test code, the language is code; when you test domain, the language is natural language. My advice to teams who can't use cucumber for doing domain testing is to approximate the same thing in rspec, even though its not the best/optimal tool for it. Gherkin (not just cucumber) is NOT just about wrapping rspec tests with a non-technical syntax. Also, as contrived as his examples are, he still managed to illustrate exactly the problem inherent in most of the cukes i've ever seen: they're about clicking buttons and navigating a browser. That's not domain. (To be fair, the cucumber team didn't do themselves any favors there by adding the web_steps.rb to their installation process way back when—its long gone now but the legacy lives on.)