aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators/app_generator_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/test/generators/app_generator_test.rb')
-rw-r--r--railties/test/generators/app_generator_test.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb
index 00ca8cad0d..58a6067cee 100644
--- a/railties/test/generators/app_generator_test.rb
+++ b/railties/test/generators/app_generator_test.rb
@@ -739,17 +739,23 @@ class AppGeneratorTest < Rails::Generators::TestCase
end
def test_generation_runs_bundle_install
- assert_generates_with_bundler
+ generator([destination_root], {})
+
+ assert_bundler_command_called("install")
end
def test_dev_option
- assert_generates_with_bundler dev: true
+ generator([destination_root], dev: true)
+
+ assert_bundler_command_called("install")
rails_path = File.expand_path("../../..", Rails.root)
assert_file "Gemfile", /^gem\s+["']rails["'],\s+path:\s+["']#{Regexp.escape(rails_path)}["']$/
end
def test_edge_option
- assert_generates_with_bundler edge: true
+ generator([destination_root], edge: true)
+
+ assert_bundler_command_called("install")
assert_file "Gemfile", %r{^gem\s+["']rails["'],\s+github:\s+["']#{Regexp.escape("rails/rails")}["']$}
end
@@ -1026,12 +1032,6 @@ class AppGeneratorTest < Rails::Generators::TestCase
end
end
- def assert_generates_with_bundler(options = {})
- generator([destination_root], options)
-
- assert_bundler_command_called("install")
- end
-
def assert_bundler_command_called(target_command)
command_check = -> command do
@command_called ||= 0