|
|
|
|
|
by benbjohnson
5770 days ago
|
|
I have a couple issues with Steak: 1. It seems to take something that's already pretty straightfoward (RSpec) and just adds a couple keywords. 2. You're writing code when you should be describing features. Trying to remember where to put an underscore or what should be a symbol makes it harder to focus on describing the feature. 3. It greek to any non-developer. If you tried e-mailing this to a product owner or a user they would ask why you're sending code samples. I know you addressed #3 in your blog post but why did you decide to use Steak over RSpec alone? Do you have any issue ramping up new developers with the Steak syntax? |
|
1) Agreed. It's simple. But, it does some nice things like 1) hook up capybara 2) create a /spec/acceptance folder and suite hook and 3) add some "behavior-oriented" keywords like feature, background and scenario. Of course, these are just dumb blocks and yes you could use the provided RSpec DSL (describe, it, before, etc) but it helps (if only mildly) to indicate that this is an acceptance test and to maybe put the programmer more in that mindset. This isn't groundbreaking, it's just a nice convention in my opinion.
2) This is a fair criticism. It does put the programmer more in a "code-centric" mindset than a "behavior-centric" one.
To address this I usually write out the feature in comments exactly as I would in cucumber. This might sound like an argument against steak, but it's not. The most useful thing about cucumber to me is the pattern of thinking: "Given this, When I do something, Then I should see that". The trouble is in the details: the maintenance, the awkward step gymnastics, etc. If you write out a pseudo-feature in comments then under each line of comments write the code, it totally remove the layer of feature vs. step definition indirection that plagues large cucumber projects.
3) Totally agreed. Though, very few projects I've used cucumber on ever let customers see feature files, let alone write them. Steak is for programmers, not customers.
There is no issue ramping up because it's just rspec and capybara. This is exactly what's under the sheets of most cucumber (for rails) installs. Anyone who implements cucumber step definitions should be well versed.