From b0108d0f19d34a7bddaef7e7936f0fc45f1ad46a Mon Sep 17 00:00:00 2001 From: bogdanvlviv Date: Tue, 15 Aug 2017 19:01:13 +0300 Subject: Move common tests from `AppGeneratorTest` and `PluginGeneratorTest` to `SharedGeneratorTests` --- railties/lib/rails/generators/rails/plugin/templates/gitignore | 2 ++ .../lib/rails/generators/rails/plugin/templates/test/test_helper.rb | 2 ++ 2 files changed, 4 insertions(+) (limited to 'railties/lib') diff --git a/railties/lib/rails/generators/rails/plugin/templates/gitignore b/railties/lib/rails/generators/rails/plugin/templates/gitignore index 8c7cad74ed..e15863d860 100644 --- a/railties/lib/rails/generators/rails/plugin/templates/gitignore +++ b/railties/lib/rails/generators/rails/plugin/templates/gitignore @@ -2,8 +2,10 @@ log/*.log pkg/ <% if with_dummy_app? -%> +<% if sqlite3? -%> <%= dummy_path %>/db/*.sqlite3 <%= dummy_path %>/db/*.sqlite3-journal +<% end -%> <%= dummy_path %>/log/*.log <% unless options[:skip_yarn] -%> <%= dummy_path %>/node_modules/ diff --git a/railties/lib/rails/generators/rails/plugin/templates/test/test_helper.rb b/railties/lib/rails/generators/rails/plugin/templates/test/test_helper.rb index a0bab22764..2fa05a9146 100644 --- a/railties/lib/rails/generators/rails/plugin/templates/test/test_helper.rb +++ b/railties/lib/rails/generators/rails/plugin/templates/test/test_helper.rb @@ -17,6 +17,7 @@ Minitest.backtrace_filter = Minitest::BacktraceFilter.new Rails::TestUnitReporter.executable = 'bin/test' <% end -%> +<% unless options[:skip_active_record] -%> # Load fixtures from the engine if ActiveSupport::TestCase.respond_to?(:fixture_path=) ActiveSupport::TestCase.fixture_path = File.expand_path("fixtures", __dir__) @@ -24,3 +25,4 @@ if ActiveSupport::TestCase.respond_to?(:fixture_path=) ActiveSupport::TestCase.file_fixture_path = ActiveSupport::TestCase.fixture_path + "/files" ActiveSupport::TestCase.fixtures :all end +<% end -%> -- cgit v1.2.3