[rspec-users] How to trace running spec
aslak.hellesoy at gmail.com
Mon Jan 14 06:33:03 EST 2008
On Jan 14, 2008 3:47 AM, Kero van Gelder <rspec-users at kero.tmfweb.nl> wrote:
> > > 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?),
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
> Time to write a ticket on lighthouse?
Sure, go ahead. But I think you're talking about a different thing
than Ben here.
> rspec-users mailing list
> rspec-users at rubyforge.org
More information about the rspec-users