3 ms·
P.S. I hate Gherkin, Cucumber and other DSLs that let you write the tests that “read like English” I'm with you there, friend! But then the author mentio
by JohnBooty 7y ago
P.S. I hate Gherkin, Cucumber and other DSLs that
let you write the tests that “read like English”
I'm with you there, friend!
But then the author mentions Rspec as a good DSL, so I don't know what their ideal of a good DSL is because Rspec's about as English-like as it gets.
- gentleterror 7y agoRSpec is written and read mostly by developers. Unlike those tools that business likes to use and abuse developers with extension requests just to feel more control over the situation.
- thrower123 7y agoAny time I've encountered Cucumber-esque testing DSLs, the amount of work that was required to plumb things up to the actual test code made me want to throw up my hands and just write xUnit tests or whatever and cut that extra work out. It's very possible that I haven't worked with anybody that really understood how this is supposed to work, and with the ten thousand other things I am responsible for, I haven't had the time or inclination to take a real deep dive into it.
- JohnBooty 7y agoI agree with you completely. I mean, they want you to write "expect(some_thing).to be_true" and even more ornate stuff. I mean, why not "expect(some_thing)" or "expect(some_thing==true)"? Rspec, Cucumber, etc. do have matchers that are helpful and more concise than idiomatic Plain Old Ruby but some of them are so basic and yet so ornate that they really seem like some kind of a joke.