File tree 2 files changed +31
-0
lines changed
2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -47,5 +47,11 @@ class Engine < ::Rails::Engine
47
47
)
48
48
end
49
49
end
50
+
51
+ initializer "devise.configure_zeitwerk" do
52
+ if Rails . autoloaders . zeitwerk_enabled? && !defined? ( ActionMailer )
53
+ Rails . autoloaders . main . ignore ( "#{ root } /app/mailers/devise/mailer.rb" )
54
+ end
55
+ end
50
56
end
51
57
end
Original file line number Diff line number Diff line change
1
+ # frozen_string_literal: true
2
+
3
+ ENV [ "RAILS_ENV" ] = 'test'
4
+
5
+ require 'rails'
6
+ require 'rails/test_help'
7
+
8
+ require 'devise'
9
+
10
+ class RailsTest < ActiveSupport ::TestCase
11
+ test 'boot without ActionMailer' do
12
+ class MinimalApp < Rails ::Application
13
+ config . root = __dir__
14
+ config . eager_load = false
15
+ config . active_support . to_time_preserves_timezone = :zone
16
+ end
17
+
18
+ Devise . setup do |config |
19
+ config . parent_controller = 'ActionController::Base'
20
+ end
21
+
22
+ MinimalApp . initialize!
23
+ MinimalApp . eager_load!
24
+ end
25
+ end
You can’t perform that action at this time.
0 commit comments