Skip to content

Commit 44ea825

Browse files
committed
1 parent 3adc19e commit 44ea825

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

railties/test/generators/authentication_generator_test.rb

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -107,23 +107,22 @@ def test_model_test_is_skipped_if_test_framework_is_given
107107
end
108108

109109
private
110-
111-
def run_generator_instance
112-
commands = []
113-
command_stub ||= -> (command, *args) { commands << [command, *args] }
114-
115-
@rails_commands = []
116-
@rails_command_stub ||= -> (command, *_) { @rails_commands << command }
117-
118-
content = nil
119-
generator.stub(:execute_command, command_stub) do
120-
generator.stub(:rails_command, @rails_command_stub) do
121-
content = super
110+
def run_generator_instance
111+
commands = []
112+
command_stub ||= -> (command, *args) { commands << [command, *args] }
113+
114+
@rails_commands = []
115+
@rails_command_stub ||= -> (command, *_) { @rails_commands << command }
116+
117+
content = nil
118+
generator.stub(:execute_command, command_stub) do
119+
generator.stub(:rails_command, @rails_command_stub) do
120+
content = super
121+
end
122122
end
123-
end
124123

125-
@bundle_commands = commands.filter { |command, _| command == :bundle }
124+
@bundle_commands = commands.filter { |command, _| command == :bundle }
126125

127-
content
128-
end
126+
content
127+
end
129128
end

0 commit comments

Comments
 (0)