"Cucumber steps (definitions) are not ruby"?

That’s the proclamation made by the tech lead here… and that translates to no method definitions inside a step definition file. “Really bad programming” is what that is.

I’d appreciate your thoughts on this issue and/or pointers to best practices for Cucumber.

@benorenstein… How about a Weekly Iteration o Cucumber Best Practices?

We stopped using cucumber about two years ago because the extra layer of indirection didn’t feel like it was adding enough value.

As for the proclamation the tech lead made, well, he/she is right. The steps themselves are not ruby. The step definitions however very much are, and should be kept just as clean as the rest of your production code using the same techniques (Extract Method, in particular).

That said, another part of the reason we abandoned cucumber was that it was quite hard to keep our step definitions clean even given diligent effort.

Thanks, @benorenstein; he did mean ‘step definitions’; I just mis-spoke in the title of this questions.

The company I’m at just switched off cucumber for the same reason. We opted for Spinach. It still uses Gherkin for readability but it doesn’t pollute your tests with global steps and has better modularization. It’s also nice that it uses Ruby.