diff options
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/generators/shared_generator_tests.rb | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/railties/test/generators/shared_generator_tests.rb b/railties/test/generators/shared_generator_tests.rb index 5ce30bd281..be9aef8a41 100644 --- a/railties/test/generators/shared_generator_tests.rb +++ b/railties/test/generators/shared_generator_tests.rb @@ -26,8 +26,8 @@ module SharedGeneratorTests default_files.each { |path| assert_file path } end - def test_generation_runs_bundle_check - generator([destination_root]).expects(:bundle_command).with('check').once + def test_generation_runs_bundle_install + generator([destination_root]).expects(:bundle_command).with('install').once quietly { generator.invoke_all } end @@ -133,6 +133,15 @@ module SharedGeneratorTests quietly { generator.invoke_all } assert_no_file 'Gemfile' end + + def test_skip_bundle + generator([destination_root], :skip_bundle => true).expects(:bundle_command).never + quietly { generator.invoke_all } + + # skip_bundle is only about running bundle install, ensure the Gemfile is still + # generated. + assert_file 'Gemfile' + end end module SharedCustomGeneratorTests |