Skip to content

Commit

Permalink
Merge pull request #13216 from arunagw/plugin-gemfile-jruby
Browse files Browse the repository at this point in the history
Skipping debugger from plugin Gemfile for JRuby
  • Loading branch information
rafaelfranca committed Dec 6, 2013
2 parents 6413fde + f1a05e7 commit 747c616
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions railties/lib/rails/generators/rails/plugin/templates/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,7 @@ end
<% end -%>
<% end -%>
<% unless defined?(JRUBY_VERSION) -%>
# To use debugger
# gem 'debugger'
<% end -%>
11 changes: 11 additions & 0 deletions railties/test/generators/plugin_generator_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,17 @@ def test_generating_test_files_in_full_mode
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"]

Expand Down

0 comments on commit 747c616

Please sign in to comment.