aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorArun Agrawal <arunagw@gmail.com>2013-12-06 16:48:28 +0100
committerArun Agrawal <arunagw@gmail.com>2013-12-06 16:48:28 +0100
commitf1a05e741d19ec7b5366c2136ffda9e03dcdcc12 (patch)
tree58f7caaf683bad246fb7c3d65cfcf7c45465a3f6 /railties
parent6413fdeb52bf1da1e8f04a6577ac5736fe285000 (diff)
downloadrails-f1a05e741d19ec7b5366c2136ffda9e03dcdcc12.tar.gz
rails-f1a05e741d19ec7b5366c2136ffda9e03dcdcc12.tar.bz2
rails-f1a05e741d19ec7b5366c2136ffda9e03dcdcc12.zip
Skipping debugger from plugin Gemfile for JRuby
Diffstat (limited to 'railties')
-rw-r--r--railties/lib/rails/generators/rails/plugin/templates/Gemfile2
-rw-r--r--railties/test/generators/plugin_generator_test.rb11
2 files changed, 13 insertions, 0 deletions
diff --git a/railties/lib/rails/generators/rails/plugin/templates/Gemfile b/railties/lib/rails/generators/rails/plugin/templates/Gemfile
index d576784415..88ec4e6354 100644
--- a/railties/lib/rails/generators/rails/plugin/templates/Gemfile
+++ b/railties/lib/rails/generators/rails/plugin/templates/Gemfile
@@ -39,5 +39,7 @@ end
<% end -%>
<% end -%>
+<% unless defined?(JRUBY_VERSION) -%>
# To use debugger
# gem 'debugger'
+<% end -%>
diff --git a/railties/test/generators/plugin_generator_test.rb b/railties/test/generators/plugin_generator_test.rb
index 7319a4e9d3..f5f2495e7d 100644
--- a/railties/test/generators/plugin_generator_test.rb
+++ b/railties/test/generators/plugin_generator_test.rb
@@ -58,6 +58,17 @@ class PluginGeneratorTest < Rails::Generators::TestCase
assert_file "test/integration/navigation_test.rb", /ActionDispatch::IntegrationTest/
end
+ def test_inclusion_of_debugger
+ run_generator [destination_root, '--full']
+ if defined?(JRUBY_VERSION)
+ assert_file "Gemfile" do |content|
+ assert_no_match(/debugger/, content)
+ end
+ else
+ assert_file "Gemfile", /# gem 'debugger'/
+ end
+ end
+
def test_generating_test_files_in_full_mode_without_unit_test_files
run_generator [destination_root, "-T", "--full"]