Feature Requests item #8139, was opened at 2007-01-25 06:28
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=3152&aid=8139&group_id=797
Category: runner module
Group: None
Status: Open
Priority: 3
Submitted By: David Chelimsky (dchelimsky)
Assigned to: Nobody (None)
Summary: &quot;not implemented&quot; message for specs yet to be implemented
Initial Comment:
If I am defining the behaviour of a class, I might make a list like this:
Money behaviour:
- should parse
- should add
- should subtract
- should multiply
- should handle division by 0
- should handle conversion
I may not know what all of those mean yet, but that is a starting point. I'd like to be able to put that right into specs and have RSpec tell me that I have yet to implement them:
context "Money behaviour" do
specify "should parse"
specify "should add"
specify "should subtract"
specify "should multiply"
specify "should handle division by 0"
specify "should handle conversion"
end
Note that each specify message has no block. Given some command line option, RSpec would collect these during a spec run and add the count to the summary:
=====
Finished in 3.212354 seconds
647 specifications, 0 failures, 25 not yet implemented
=====
Combined with the --format specdoc (or -fs) option, the report would look like this:
=====
Money behaviour:
- should parse
- should add
- should subtract
- should multiply
- should handle division by 0 (NOT IMPLEMENTED
- should handle conversion (NOT IMPLEMENTED)
Finished in 0.212354 seconds
6 specifications, 0 failures, 2 not yet implemented
=====
This would a great aid in monitoring progress during an iteration.
----------------------------------------------------------------------
Comment By: Wilson Bilkovich (wilson)
Date: 2007-01-26 19:12
Message:
Hi David,
I was just giving you a hard time.
I remain highly in favor of this feature. I would be happy to help implement it, and/or stuff people who don't like it into trashcans at RailsConf.
----------------------------------------------------------------------
Comment By: David Chelimsky (dchelimsky)
Date: 2007-01-26 06:29
Message:
Hi Wilson,
Funny - I forgot about that.
OK - first of all these requests aren't the same. What [#6396] is asking for is a way to stop code from being executed using a keyword disable_specify. What I'm proposing here is different. It's a non-code place-holder right in the spec so I don't have to keep it elsewhere.
Now, reading through the comments on that thread, I see that this idea was already proposed (by me, as it turns out - I'm a bit too young for senility - perhaps a vacation is in order), however even in that proposal I was talking about a special keyword.
This proposal is a little different. It lets me do the same thing but with something that feels more integrated to me - it's the same keyword (specify), and it is noted as something different only by the absence of the block. So to resolve the un-implemented specs I have to add a block and add code, not change keywords.
I guess you could argue that the keyword would make things more obvious when looking at the code, but if we're adding keywords I'd rather have them be more aligned w/ the BDD message - things like "story" and "behaviour".
----------------------------------------------------------------------
Comment By: Wilson Bilkovich (wilson)
Date: 2007-01-26 01:32
Message:
Duplicate? :)
http://rubyforge.org/tracker/index.php?func=detail&aid=6396&group_id=797&atid=3152
----------------------------------------------------------------------
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=3152&aid=8139&group_id=797