search for: foolisten

Displaying 1 result from an estimated 1 matches for "foolisten".

Did you mean: nolisten
2009 Sep 27
1
Switchboard - Easy to use global ActiveRecord event listeners
...the time: Spec::Runner.configure do |config| config.before(:each) do Switchboard.listeners.clear end end Then, when you want them back on again, you can either turn them back on for a spec: describe "Integrating with listeners" do before do Switchboard.listeners << FooListener end end When doing data imports, migrations or certain actions that need to only use certain listeners, you can easily specify which ones you''d like to use: Switchboard.with_listeners AuditListener, ActivityListener do Article.create! :title => "foo" end After the blo...