aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2017-08-17 15:20:41 -0400
committerGitHub <noreply@github.com>2017-08-17 15:20:41 -0400
commit46a366e7f287623b61da4b998a466eb1a9587326 (patch)
treefdbcf69d61be79f5f97d0037a79dd220611e4c73 /railties/lib
parent9876196612bcd59faadca7f091de859fdfe6b991 (diff)
parentb0108d0f19d34a7bddaef7e7936f0fc45f1ad46a (diff)
downloadrails-46a366e7f287623b61da4b998a466eb1a9587326.tar.gz
rails-46a366e7f287623b61da4b998a466eb1a9587326.tar.bz2
rails-46a366e7f287623b61da4b998a466eb1a9587326.zip
Merge pull request #30274 from bogdanvlviv/dry-in-generators-tests
Move common tests to `SharedGeneratorTests`
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/rails/generators/rails/plugin/templates/gitignore2
-rw-r--r--railties/lib/rails/generators/rails/plugin/templates/test/test_helper.rb2
2 files changed, 4 insertions, 0 deletions
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 -%>