[rspec-devel] [ rspec-Bugs-14671 ] Spec::DSL::ExampleRunner gives "NO NAME because of --dry-run" for every example for 'rake spec:doc'

noreply at rubyforge.org noreply at rubyforge.org
Thu Oct 18 20:35:26 EDT 2007


Bugs item #14671, was opened at 2007-10-12 23:33
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=14671&group_id=797

Category: runner module
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 3
Submitted By: Tim  Dysinger (dysinger)
>Assigned to: David Chelimsky (dchelimsky)
>Summary: Spec::DSL::ExampleRunner gives "NO NAME because of --dry-run" for every example for 'rake spec:doc'

Initial Comment:
This used to work but currently in trunk is broken.  Reproduce by rake spec:doc on a rails project with specs and examples.

It can be fixed by commenting out line 19 of example runner where it statically assigns the example_definition.description as "NO NAME (Because of --dry-run)" instead of just leaving it as the actual example def description.

???


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

>Comment By: David Chelimsky (dchelimsky)
Date: 2007-10-19 00:35

Message:
Fixed in r2737

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

Comment By: David Chelimsky (dchelimsky)
Date: 2007-10-13 03:02

Message:
I think this is a casualty of some recent refactoring in which there are specs for a positive case but not a negative case.

Unfortunately, the fix is not as simple as you prescribe, as that would result in incorrect behaviour for examples with no strings:

describe Foo do
  before {@foo = Foo.new}
  specify {@foo.should be_bar}
end

This case, which is supported, should produce "NO NAME (Because of --dry-run)" when running a dry run.

So, we'll fix it, but it'll require a bit more work than simply removing lines of code. Patches welcome.

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

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


More information about the rspec-devel mailing list