Forum: RSpec running 1 example

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
A31c2c26350e9e2b07fbd99fbd5ff520?d=identicon&s=25 lawrence.pit (Guest)
on 2009-05-18 15:45
(Received via mailing list)
Hi,

Suppose you have a file with dozens of examples within several
describe/context blocks, and you wanted to focus on just one example.
Is there an easy way to run just that one example instead of all the
examples in the file?



Cheers,
Lawrence
5d38ab152e1e3e219512a9859fcd93af?d=identicon&s=25 David Chelimsky (Guest)
on 2009-05-18 15:48
(Received via mailing list)
On Mon, May 18, 2009 at 7:04 AM, lawrence.pit <lawrence.pit@gmail.com>
wrote:
> Hi,
>
> Suppose you have a file with dozens of examples within several
> describe/context blocks, and you wanted to focus on just one example.
> Is there an easy way to run just that one example instead of all the
> examples in the file?

$ spec --help
...
-l, --line LINE_NUMBER           Execute example group or example at
given line.
...

HTH,
David
48641c4be1fbe167929fb16c9fd94990?d=identicon&s=25 Mark Wilden (Guest)
on 2009-05-18 21:06
(Received via mailing list)
On Mon, May 18, 2009 at 6:46 AM, David Chelimsky
<dchelimsky@gmail.com>wrote:

> ...
> -l, --line LINE_NUMBER           Execute example group or example at given
> line.
>

Also, 'spec foo_spec.rb:3' which is the same way Cucumber does it.

///ark
This topic is locked and can not be replied to.