From 592c06d7cb158df07bf87246c23af24b72d13c97 Mon Sep 17 00:00:00 2001 From: Tsukuru Tanimichi Date: Mon, 14 Nov 2016 18:09:26 +0900 Subject: Add `:skip_sprockets` to `Rails::PluginBuilder::PASSTHROUGH_OPTIONS` `rails plugin new` with `--full` and `--skip-sprockets` options generates a dummy application that throws `NoMethodError`. ``` % rails plugin new my_engine -S --full --skip-gemspec % cd my_engine % bin/rails test rails aborted! NoMethodError: undefined method `assets' for # ``` --- railties/test/generators/plugin_generator_test.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'railties/test/generators/plugin_generator_test.rb') diff --git a/railties/test/generators/plugin_generator_test.rb b/railties/test/generators/plugin_generator_test.rb index 15079f2735..0fdc30ac43 100644 --- a/railties/test/generators/plugin_generator_test.rb +++ b/railties/test/generators/plugin_generator_test.rb @@ -100,6 +100,14 @@ class PluginGeneratorTest < Rails::Generators::TestCase end end + def test_generating_adds_dummy_app_in_full_mode_without_sprockets + run_generator [destination_root, "-S", "--full"] + + assert_file "test/dummy/config/environments/production.rb" do |contents| + assert_no_match(/config\.assets/, contents) + end + end + def test_generating_adds_dummy_app_rake_tasks_without_unit_test_files run_generator [destination_root, "-T", "--mountable", "--dummy-path", "my_dummy_app"] assert_file "Rakefile", /APP_RAKEFILE/ -- cgit v1.2.3 From a865e3b2620197641e6ae519647ad81098182dec Mon Sep 17 00:00:00 2001 From: Guillermo Iguaran Date: Sat, 19 Nov 2016 18:16:28 -0500 Subject: Don't add jQuery by default in new apps and use rails-ujs as UJS adapter instead --- railties/test/generators/plugin_generator_test.rb | 1 - 1 file changed, 1 deletion(-) (limited to 'railties/test/generators/plugin_generator_test.rb') diff --git a/railties/test/generators/plugin_generator_test.rb b/railties/test/generators/plugin_generator_test.rb index 0fdc30ac43..a0018dc782 100644 --- a/railties/test/generators/plugin_generator_test.rb +++ b/railties/test/generators/plugin_generator_test.rb @@ -507,7 +507,6 @@ class PluginGeneratorTest < Rails::Generators::TestCase assert_no_match("gemspec", contents) assert_match(/gem 'rails'/, contents) assert_match_sqlite3(contents) - assert_no_match(/# gem "jquery-rails"/, contents) end end -- cgit v1.2.3 From 10fb7211bb4e7df5b796da489df8b056b95178d4 Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Fri, 23 Dec 2016 23:45:39 +0900 Subject: Privatize unneededly protected methods in Railties tests --- railties/test/generators/plugin_generator_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/test/generators/plugin_generator_test.rb') diff --git a/railties/test/generators/plugin_generator_test.rb b/railties/test/generators/plugin_generator_test.rb index a0018dc782..9921a80342 100644 --- a/railties/test/generators/plugin_generator_test.rb +++ b/railties/test/generators/plugin_generator_test.rb @@ -714,7 +714,7 @@ class PluginGeneratorTest < Rails::Generators::TestCase end end - protected + private def action(*args, &block) silence(:stdout) { generator.send(*args, &block) } -- cgit v1.2.3