[rspec-devel] [ rspec-Feature Requests-6396 ] Disabled Specifications and a Yellow build

noreply at rubyforge.org noreply at rubyforge.org
Mon Oct 30 04:57:46 EST 2006


Feature Requests item #6396, was opened at 2006-10-30 07:51
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3152&aid=6396&group_id=797

Category: runner module
Group: None
Status: Open
Priority: 3
Submitted By: Nobody (None)
Assigned to: Nobody (None)
Summary: Disabled Specifications and a Yellow build

Initial Comment:
Add a method that denotes a specification is disabled and causes a yellow build.

For example:
disable_specify "should support disabled specifications" do
end

This will be helpful in writing a spec before the feature is implemented.

----------------------------------------------------------------------

>Comment By: David Chelimsky (dchelimsky)
Date: 2006-10-30 09:57

Message:
Writing an entire specify block before a feature is implemented is not what BDD is about. It goes against the red/green/refactor cycle of TDD, which sits at the heart of BDD.

For what it's worth, there is a similar feature in NUnit. I don't believe that I've ever seen it used to allow tests to be ignored in advance of implementation. I've only ever seen it used to ignore existing tests that had been passing and were now failing. Worse, I've seen this cause yellow to become the new green (i.e. an acceptable state for commits and sometimes even releases). Absolutely vile.

That said, making decisions about behaviour in advance of implementation is very much aligned w/ BDD, even TDD. What would you think about something like this:

implement "should support placeholders for yet to exist specs"

This would not accept a block. In fact it would raise if you try to give it one. This way you could write placeholders for specs you know you want, but not allow you to put any code in them. Then there could be a command line option that allows you to report on yet-to-implement specs.

Of course, if you insist on violating one of the most basic principles of BDD, you can write up your spec code and comment it out. The commented code would be in a logical place, but the tool would not be condoning the practice.

Thoughts?

David

----------------------------------------------------------------------

Comment By: Brian Takita (btakita)
Date: 2006-10-30 07:57

Message:
I submitted this.

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3152&aid=6396&group_id=797


More information about the rspec-devel mailing list