File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,9 @@ class Premailer
22 module Rails
33 class Railtie < ::Rails ::Railtie
44 ActiveSupport . on_load ( :action_mailer ) do
5- ::Premailer ::Rails . register_interceptors
5+ ActiveSupport ::Notifications . instrument ( 'register_interceptors.premailer_rails' ) do
6+ ::Premailer ::Rails . register_interceptors
7+ end
68 end
79 end
810 end
Original file line number Diff line number Diff line change 1+ require 'spec_helper'
2+
3+ describe Premailer ::Rails ::Railtie do
4+ it 'supports instrumentation' do
5+ subscriber = double ( ) . as_null_object
6+
7+ ActiveSupport ::Notifications . subscribe ( 'register_interceptors.premailer_rails' ) do
8+ subscriber . call
9+ end
10+
11+ ActiveSupport . run_load_hooks ( :action_mailer , ActionMailer ::Base )
12+
13+ expect ( subscriber ) . to have_received ( :call ) . at_least ( :once )
14+ end
15+ end
You can’t perform that action at this time.
0 commit comments