aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators
diff options
context:
space:
mode:
authorGuillermo Iguaran <guilleiguaran@gmail.com>2018-04-20 12:17:15 -0500
committerGuillermo Iguaran <guilleiguaran@gmail.com>2018-04-20 12:17:15 -0500
commitb10f371366a606310cab26648d798836e030bdc8 (patch)
treef2ac94cd44b01c56568f3d0a5e1c447f3ff97199 /railties/test/generators
parent5fd7ac79a10dc09f2394b69fed2311c35c81d623 (diff)
downloadrails-b10f371366a606310cab26648d798836e030bdc8.tar.gz
rails-b10f371366a606310cab26648d798836e030bdc8.tar.bz2
rails-b10f371366a606310cab26648d798836e030bdc8.zip
Don't include bootsnap by default in apps generated under JRuby
Diffstat (limited to 'railties/test/generators')
-rw-r--r--railties/test/generators/app_generator_test.rb15
1 files changed, 12 insertions, 3 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb
index 970f0639be..cd607ca8d8 100644
--- a/railties/test/generators/app_generator_test.rb
+++ b/railties/test/generators/app_generator_test.rb
@@ -816,9 +816,18 @@ class AppGeneratorTest < Rails::Generators::TestCase
def test_bootsnap
run_generator
- assert_gem "bootsnap"
- assert_file "config/boot.rb" do |content|
- assert_match(/require 'bootsnap\/setup'/, content)
+ unless defined?(JRUBY_VERSION)
+ assert_gem "bootsnap"
+ assert_file "config/boot.rb" do |content|
+ assert_match(/require 'bootsnap\/setup'/, content)
+ end
+ else
+ assert_file "Gemfile" do |content|
+ assert_no_match(/bootsnap/, content)
+ end
+ assert_file "config/boot.rb" do |content|
+ assert_no_match(/require 'bootsnap\/setup'/, content)
+ end
end
end