Aah... thank you.

It looks like what I really want is --example (I want to be able to run a selected few examples). But that also seems to have some weirdess:

$ spec spec/models --example spec/models/discount_spec.rb
Finished in 1.527043 seconds
0 examples, 0 failures

I can see from the log that application initialization is happening, but none of the examples are being run.

Suggestions?

Thanks,

dwh



David Chelimsky wrote:
On Wed, Sep 23, 2009 at 9:46 AM, Denis Haskin <[email protected]> wrote:
(asked this yesterday on #rspec, no response...)

Am I missing something obvious about --pattern?  It seems to only run the
first spec that matches the pattern; I expected it to run all that match.

I tried:
spec spec/models --pattern line_item
spec spec/models --pattern \*line_item\*
spec spec/models --pattern '*line_item*'

all to no avail...

The pattern is passed to Dir.glob, referenced from the ./spec
directory in the project. It needs to be in the correct format given
those considerations. The three variations you tried all look for
files matching line_item in the ./spec directory, not its
subdirectories. Try this:

spec spec/models --pattern "**/line_item*"

Maybe I'll go look at the source.  That would be a concept.

dwh


_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to