How to trace running spec

Hey all,

I have a spec that is hanging when it is running.

How do I get the rspec runner to show what specs it’s running so I can
which one is hanging? I am calling the runner from my rails project.

Thanks,
Ben

Ben G. wrote:

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

Which formatter ate you using? If you use the specdoc formatter it will
output the specs as it goes so you can tell where it is hanging. Also,
there is a profiling one that will list the slowest specs. Run “spec
-h” for more info.

-Ben

I have a spec that is hanging when it is running.

How do I get the rspec runner to show what specs it’s running so I can
which one is hanging? I am calling the runner from my rails project.

Which formatter ate you using? If you use the specdoc formatter it will
output the specs as it goes so you can tell where it is hanging. Also,
there is a profiling one that will list the slowest specs. Run “spec
-h” for more info.

Though a formatter is no listener (or is it?), it seems to act like one.
Steps do not tell their listeners when they are started, only when they
are finished.

Assuming a known order, you can figure out which step hangs, but it is
not the one listed last (it’s the one after that…)

Another reason to have s step_started method in listeners, is to format
(tell the customer) about a step before the step is executed, such
that
the customer knows what will happen, instead of heard what has just
happened.

Time to write a ticket on lighthouse?

Bye,
Kero.

On Jan 14, 2008 3:47 AM, Kero van Gelder [email protected]
wrote:

Though a formatter is no listener (or is it?),
A formatter “listens” to events related to running of examples
(specs), so you can call it a “listener”.

it seems to act like one.

It does. All our “listeners” output results in some way or another,
which is why we call them formatters, both in our code and in the
command line api (–formatter).

To make things even more confusing, we actually use the term
“listener” in the story framework, but only in the code. The command
line api still calls them formatter.

Steps do not tell their listeners when they are started, only when they
are finished.

Steps is a concept you only find in the story framework. I think Ben
was talking about RSpec “classic”.

Assuming a known order, you can figure out which step hangs, but it is
not the one listed last (it’s the one after that…)

Another reason to have s step_started method in listeners, is to format
(tell the customer) about a step before the step is executed, such that
the customer knows what will happen, instead of heard what has just
happened.

Time to write a ticket on lighthouse?

Sure, go ahead. But I think you’re talking about a different thing
than Ben here.

Aslak

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs