aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails
diff options
context:
space:
mode:
authorbogdanvlviv <bogdanvlviv@gmail.com>2017-08-15 19:01:13 +0300
committerbogdanvlviv <bogdanvlviv@gmail.com>2017-08-17 15:55:22 +0300
commitb0108d0f19d34a7bddaef7e7936f0fc45f1ad46a (patch)
tree218fbb9a8f331deaed81e9cc1f500107ca69e4bb /railties/lib/rails
parent251d3f9151322f95c1a339f26a9660a79212859f (diff)
downloadrails-b0108d0f19d34a7bddaef7e7936f0fc45f1ad46a.tar.gz
rails-b0108d0f19d34a7bddaef7e7936f0fc45f1ad46a.tar.bz2
rails-b0108d0f19d34a7bddaef7e7936f0fc45f1ad46a.zip
Move common tests from `AppGeneratorTest` and `PluginGeneratorTest` to `SharedGeneratorTests`
Diffstat (limited to 'railties/lib/rails')
-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 -%>