[rspec-users] NO NAME (Because of --dry-run) output

Steve vertebrate at gmail.com
Sat Oct 13 21:59:36 EDT 2007

On Sat, 06 Oct 2007 09:21:34 -0500, David Chelimsky wrote:

> There is an auto-generation feature that let's you do this:
>   specify { something.should be_something }
> which would produce output:
> - should be something
> The thing is that it relies on actually running the examples, which
> spec:doc does not do.
> If you're trying to run the specs so they produce the specdoc output, do this:
> script/spec spec -fs
> That will run the examples and produce the output.

I'm running rspec and rspec_on_rails trunk(r2717), and am getting this,
except my "its" have string descriptions. One of my "describes" looks like

describe 'Person trying to logon' do
  fixtures :users
  it 'with an invalid username should fail' do
    User.logon('harry', '123456').should be_nil
  it 'with an invalid password should fail' do
    User.logon(users(:admin).username, '').should be_nil

If I'm understanding you correctly, since I have the strings, with spec:doc
I should get output similar to:

Person trying to logon
- with an invalid username should fail
- with an invalid password should fail

But I'm just getting:

Person trying to logon
- NO NAME (Because of --dry-run)
- NO NAME (Because of --dry-run)

Further, I tried the script/spec -fs line mentioned, and get a rake
failure complaining of too few args:

script/spec spec -fs
script/spec:4:in `run': wrong number of arguments (5 for 1) (ArgumentError)
        from script/spec:4


More information about the rspec-users mailing list