On Fri, Jan 8, 2010 at 7:24 AM, mix <fausto.ga...@email.it> wrote:

> hi, is there a way to call a method/print something after ALL the
> specs are run ? (with all, i mean all, after all the spec files, just
> before the rspec output which say how many spec have passed)..
>
> i want to print some text telling which is the average response time
> and which is the action which takes more time
>
> I've tried with the ruby at_exit method, but it puts the result 3
> times, any hint?
>

Best bet is probably a custom formatter. I'd make a subclass of the
formatter you want to use, for example
Spec::Runner::Formatter::ProgressBarFormatter, and override the dump_summary
method (which is defined in Spec::Runner::Formatter::BaseTextFormatter).

Then you can say:

spec spec --formatter <path/to/your/custom/formatter>

HTH,
David
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to