Closed trans closed 13 years ago
RSpec 2 already provides support for metadata which is also available in a Steak feature. You could do something like this:
feature "Subtraction", :ticket => {
:number => 2,
:url => "http://...",
:description => %{
The Calculator class should support subtraction.
}
} do
# ...
Which is quite similar to your proposal. If you still prefer your DSL (which looks a bit nicer) and thinks that it is worth to write an extension, I'd suggest you write a new gem that extends current RSpec metadata functionality.
Anyway, I'd like to keep Steak as simple as possible. In my opinion, for this use case, what RSpec provides is enough.
Cheers!
Ah, that will work. Thanks.
I've been experimenting with testing dsls and ended up with something very much like Steak. But I had a couple of additional ideas, so I thought I might share them. Perhaps you will want to incorporate them into Steak. I'll divided them up into a few issues. This issue will cover the first idea.
Allow for Ticket/Issue information in a feature definition. It could be something like:
Or perhaps wrap the information in a ticket/issue block:
Though perhaps the
description
could still remain in the feature block. In any case, the idea here is to be able to more closely link one's issue tracker with testing. In fact, it could be possible to build tools up around this to automatically update tickets via tests and/or scaffold tests via tickets. Of course there is the question of which issue systems to support (I'm thinking of GitHub in my examples), but, using a ticket block especially, these fields could have arbitrary names, or be set by a configuration file, so as to reflect any system.