Running 1 example


#1

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


#2

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


#3

On Mon, May 18, 2009 at 6:46 AM, David C.
removed_email_address@domain.invalidwrote:


-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