Skip to content

Commit

Permalink
Skipping debugger from plugin Gemfile for JRuby
Browse files Browse the repository at this point in the history
  • Loading branch information
arunagw committed Dec 6, 2013
1 parent 6413fde commit f1a05e7
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 Original file line Diff line number Diff line change
Expand Up @@ -39,5 +39,7 @@ end
<% end -%> <% end -%>
<% end -%> <% end -%>
<% unless defined?(JRUBY_VERSION) -%>
# To use debugger # To use debugger
# gem 'debugger' # gem 'debugger'
<% end -%>
11 changes: 11 additions & 0 deletions railties/test/generators/plugin_generator_test.rb
Original file line number Original file line 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/ assert_file "test/integration/navigation_test.rb", /ActionDispatch::IntegrationTest/
end 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 def test_generating_test_files_in_full_mode_without_unit_test_files
run_generator [destination_root, "-T", "--full"] run_generator [destination_root, "-T", "--full"]


Expand Down

0 comments on commit f1a05e7

Please sign in to comment.