Closed david closed 11 years ago
Part of the goals of RSpec-Given is to eliminate a lot of the redundant comments that pervade our specs. Consider rewriting your spec like this:
Given(:me) { a_signed_up_user }
When(:dashboard) { sign_in(me) }
Then { dashboard.visible? }
I don't think that loses any clarity by omitting the string based comments.
Jim, thanks for your reply. I understand where you're coming from, and I agree. The only problem is that the code you proposed can be read by programmers only, and I was hoping to be able to generate readable enough output (using a formatter) that I could show to non-technical people without having to resort to cucumber.
But I agree. Maybe that's outside the scope of this project. I'll close this and will go back to the drawing board. :)
Hey Jim, thanks for your work on rspec-given, I've been using it as my main (unit) specification tool.
I'm wondering if it could be used for more than that, though.
I'm specifically thinking of something like this:
This would probably allow me to remove cucumber from my workflow. Would you be open to extend rspec-given so it could do this? Do you think it makes sense? If you do, I can try to provide a patch for it.