armstrong / armstrong

Open Source News
http://armstrongcms.org
Apache License 2.0
134 stars 23 forks source link

Lettuce/BDD Sucks #87

Open Jbonnett opened 11 years ago

Jbonnett commented 11 years ago

Lettuce is a strange way to write a english like domain specific language for your tests. It is a pain. We all know python. Python both executes and conveys the meaning of tests. We should remove lettice and replace the tests with normal unit tests. Luckily, since you have to implement all the steps of a test in python anyway, some minimal copy/paste/refactor is all that will be needed.

Jbonnett commented 11 years ago

(if 13.09 is too soon, let me know)

tswicegood commented 11 years ago

I agree that Lettuce isn't great, but the original idea was to spend time documenting out features without any code so we could all agree on what we were implementing before the expensive part starts. For all its warts, Lettuce (remarkably) does at least work.

Jbonnett commented 11 years ago

tombstone

If that's not damning with faint praise, I don't know what is. Ripping lettuce out will help with adding/updating tests. Given how full out dance card currently is, if you want to punt on it till 2014, I can understand that.

tswicegood commented 11 years ago

You missed my point. The implementation of Lettuce sucks, not Gherkin. I think there is something immensely valuable in spelling out the behavior of what you're about to build before building it and I don't think that can be done with tests.

I'm happy to replace Lettuce with a different implementation of a Gherkin parser/runner, but I still would like to keep that there.

Jbonnett commented 11 years ago

Spelling out behavior in english is valuable. Writing tests is valuable. There is nothing inherent in the gherkin parser to force those what happens to actually map to the proper english words to describe them. Therefore, there is no benefit in gherkin/lettuce/cucumber over a spec and some tests to justify the additional layer of abstraction. Even the name, BDD is a farce. It suggests it does one thing, establish the behavior of a piece of code, but then merely gives you the illusion that that is what it is doing.