File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
lib/rails/generators/rails/authentication Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ def create_authentication_files
19
19
template "app/controllers/concerns/authentication.rb"
20
20
template "app/controllers/passwords_controller.rb"
21
21
22
- template "app/channels/application_cable/connection.rb" unless options . skip_action_cable?
22
+ template "app/channels/application_cable/connection.rb" if defined? ( ActionCable :: Engine )
23
23
24
24
template "app/mailers/passwords_mailer.rb"
25
25
Original file line number Diff line number Diff line change @@ -108,11 +108,14 @@ def test_model_test_is_skipped_if_test_framework_is_given
108
108
end
109
109
110
110
def test_connection_class_skipped_without_action_cable
111
- generator ( [ destination_root ] , skip_action_cable : true )
112
-
111
+ old_value = ActionCable . const_get ( :Engine )
112
+ ActionCable . send ( :remove_const , :Engine )
113
+ generator ( [ destination_root ] )
113
114
run_generator_instance
114
115
115
116
assert_no_file "app/channels/application_cable/connection.rb"
117
+ ensure
118
+ ActionCable . const_set ( :Engine , old_value )
116
119
end
117
120
118
121
private
You can’t perform that action at this time.
0 commit comments