diff options
author | David RodrÃguez de Dios <deivid.rodriguez@gmail.com> | 2014-04-08 20:57:12 +0200 |
---|---|---|
committer | David RodrÃguez de Dios <deivid.rodriguez@gmail.com> | 2014-04-08 20:57:12 +0200 |
commit | d8a4e482202bc8d42a16b2311598d49d34304bd6 (patch) | |
tree | 15d333bfcb91c2efbf15fe7f472c07d80dfcc0be /railties/test/generators | |
parent | 7901ae13a1d8187c1b620b51df7d840818fd759d (diff) | |
download | rails-d8a4e482202bc8d42a16b2311598d49d34304bd6.tar.gz rails-d8a4e482202bc8d42a16b2311598d49d34304bd6.tar.bz2 rails-d8a4e482202bc8d42a16b2311598d49d34304bd6.zip |
Update Gemfile templates to provide correct debugger
Diffstat (limited to 'railties/test/generators')
-rw-r--r-- | railties/test/generators/app_generator_test.rb | 7 | ||||
-rw-r--r-- | railties/test/generators/plugin_generator_test.rb | 7 |
2 files changed, 10 insertions, 4 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 8e1aeddb2b..68b71e9927 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -305,14 +305,17 @@ class AppGeneratorTest < Rails::Generators::TestCase assert_file "Gemfile", /gem 'jbuilder'/ end - def test_inclusion_of_debugger + def test_inclusion_of_a_debugger run_generator if defined?(JRUBY_VERSION) assert_file "Gemfile" do |content| + assert_no_match(/byebug/, content) assert_no_match(/debugger/, content) end - else + elsif RUBY_VERSION < '2.0.0' assert_file "Gemfile", /# gem 'debugger'/ + else + assert_file "Gemfile", /# gem 'byebug'/ end end diff --git a/railties/test/generators/plugin_generator_test.rb b/railties/test/generators/plugin_generator_test.rb index 7a2701f813..853af80111 100644 --- a/railties/test/generators/plugin_generator_test.rb +++ b/railties/test/generators/plugin_generator_test.rb @@ -64,14 +64,17 @@ class PluginGeneratorTest < Rails::Generators::TestCase assert_file "test/integration/navigation_test.rb", /ActionDispatch::IntegrationTest/ end - def test_inclusion_of_debugger + def test_inclusion_of_a_debugger run_generator [destination_root, '--full'] if defined?(JRUBY_VERSION) assert_file "Gemfile" do |content| + assert_no_match(/byebug/, content) assert_no_match(/debugger/, content) end - else + elsif RUBY_VERSION < '2.0.0' assert_file "Gemfile", /# gem 'debugger'/ + else + assert_file "Gemfile", /# gem 'byebug'/ end end |