aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2013-12-06 07:52:20 -0800
committerRafael Mendonça França <rafaelmfranca@gmail.com>2013-12-06 07:52:20 -0800
commit747c616aa78ebc0fecc01123c6b9623f970d26bb (patch)
tree58f7caaf683bad246fb7c3d65cfcf7c45465a3f6
parent6413fdeb52bf1da1e8f04a6577ac5736fe285000 (diff)
parentf1a05e741d19ec7b5366c2136ffda9e03dcdcc12 (diff)
downloadrails-747c616aa78ebc0fecc01123c6b9623f970d26bb.tar.gz
rails-747c616aa78ebc0fecc01123c6b9623f970d26bb.tar.bz2
rails-747c616aa78ebc0fecc01123c6b9623f970d26bb.zip
Merge pull request #13216 from arunagw/plugin-gemfile-jruby
Skipping debugger from plugin Gemfile for JRuby
-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"]