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.
lawrence.pit (Guest)
on 2009-05-18 17: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
David C. (Guest)
on 2009-05-18 17:48
(Received via mailing list)
On Mon, May 18, 2009 at 7:04 AM, lawrence.pit 
<removed_email_address@domain.invalid>
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
Mark W. (Guest)
on 2009-05-18 23:06
(Received via mailing list)
On Mon, May 18, 2009 at 6:46 AM, David C.
<removed_email_address@domain.invalid>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.