--
You received this message because you are subscribed to the Google Groups "rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rspec+un...@googlegroups.com.
To post to this group, send email to rs...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/70b0b368-588f-4c8a-a76b-20e27fb23881%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi AdamThis is something that can be done with a formatter, but you'd have to use example_started and example_finished to replicate before / after but the notification should include the example run time.If up needed more detail you'd probably have to ask us to add more hooks as we currently don't do any notifications between start and stop iirc but we do in include all hook time in our run time.Make sense?Cheers
Hey RSpec Team--I hope you are doing well!Recently I've been trying to build a custom formatter that allows us to monitor code in our before and after hooks. To give a bit more context FactoryGirl subscribes to ActiveSupports instrumentation api and it allows you to monitor the length of time factories take to setup and I've been doing this inside a before and after block before a test suite is run in RSpec.This seems like something that could be extracted to a gem and would potentially be useful to a lot of projects, so I tried to build a custom formatter that would do this for me. But I am just not sure on what to do in order to hook into the before and after blocks in RSpec.So my two questions are;Is this something I should even be doing with a custom formatter?If so is there some sort of stable public API in rspec-core that I am supposed to hook into, in order to gain access to the before and after blocks that are run for the test suite?Thanks
You received this message because you are subscribed to the Google Groups "rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rspec+unsubscribe@googlegroups.com.
Hi AdamThis is something that can be done with a formatter, but you'd have to use example_started and example_finished to replicate before / after but the notification should include the example run time.If up needed more detail you'd probably have to ask us to add more hooks as we currently don't do any notifications between start and stop iirc but we do in include all hook time in our run time.Make sense?Cheers
Hey RSpec Team--I hope you are doing well!Recently I've been trying to build a custom formatter that allows us to monitor code in our before and after hooks. To give a bit more context FactoryGirl subscribes to ActiveSupports instrumentation api and it allows you to monitor the length of time factories take to setup and I've been doing this inside a before and after block before a test suite is run in RSpec.This seems like something that could be extracted to a gem and would potentially be useful to a lot of projects, so I tried to build a custom formatter that would do this for me. But I am just not sure on what to do in order to hook into the before and after blocks in RSpec.So my two questions are;Is this something I should even be doing with a custom formatter?If so is there some sort of stable public API in rspec-core that I am supposed to hook into, in order to gain access to the before and after blocks that are run for the test suite?Thanks
You received this message because you are subscribed to the Google Groups "rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rspec+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to rspec+un...@googlegroups.com.
To post to this group, send email to rs...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/6770daa7-e80b-4bbf-8395-85300dbc675d%40googlegroups.com.