I'm trying to find a spec parameter that will do something like the following $ spec file.spec Spec: running "it should pass spec x" . Spec: running "it should pass spec y" . That type of thing. The use case is that "one" of my tests is outputting some weird stuff and I want to narrow down on which one it is easily. Does such a thing exist? If not would a patch for it be welcome? Thanks. -r
on 2010-02-25 16:31
on 2010-02-25 16:46
On Feb 25, 2010, at 9:29 AM, rogerdpack <rogerpack2005@gmail.com> wrote: > I'm trying to find a spec parameter that will do something like the > following > > $ spec file.spec > > Spec: running "it should pass spec x" > . > Spec: running "it should pass spec y" > . > In rspec-1: spec spec --format nested In rspec-2; rspec spec --format doc HTH, David
on 2010-02-25 16:46
Do you mean --format specdoc ? On 25 Feb 2010, at 15:29, rogerdpack wrote: > > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users cheers, Matt http://mattwynne.net +447974 430184
on 2010-02-25 19:03
On Feb 25, 8:44 am, Matt Wynne <m...@mattwynne.net> wrote:
> Do you mean --format specdoc ?
Interesting.
It appears that with both specdoc and --format nested, it outputs the
test name *after* running it. I would have expected the opposite. Is
this expected?
Thanks.
-r
on 2010-02-25 19:39
rogerdpack wrote: > Interesting. > It appears that with both specdoc and --format nested, it outputs the > test name *after* running it. I would have expected the opposite. Is > this expected? > Thanks. > -r > Yes. RSpec needs to know if the test passed or failed so it knows how to color it. At least, that's my layman's guess. Peace, Phillip
on 2010-02-25 19:59
On Thu, Feb 25, 2010 at 11:47 AM, rogerdpack <rogerpack2005@gmail.com> wrote: > On Feb 25, 8:44 am, Matt Wynne <m...@mattwynne.net> wrote: >> Do you mean --format specdoc ? > > Interesting. > It appears that with both specdoc and --format nested, it outputs the > test name *after* running it. I would have expected the opposite. Is > this expected? Actually it is (now that you mention it). The reason is that each example reports whether it passed or failed, which it clearly can't know until it's run. Another solution for your issue would be to write a custom formatter: http://wiki.github.com/dchelimsky/rspec/custom-formatters HTH, David
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.