diff options
author | NorimasaAndo <norimasa.ando@gmail.com> | 2014-12-14 21:23:44 +0900 |
---|---|---|
committer | NorimasaAndo <norimasa.ando@gmail.com> | 2014-12-14 21:25:26 +0900 |
commit | 8493f44976402b20eb7eafb487ae4213cdb48c94 (patch) | |
tree | 6e7d242718d7882b762084b2452f6e93dcfdb9b9 /railties/test | |
parent | 870519395f4adfcfe35054b76d3db24662871569 (diff) | |
download | rails-8493f44976402b20eb7eafb487ae4213cdb48c94.tar.gz rails-8493f44976402b20eb7eafb487ae4213cdb48c94.tar.bz2 rails-8493f44976402b20eb7eafb487ae4213cdb48c94.zip |
Fix Duplicate web-console entries in Gemfile
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/generators/app_generator_test.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index b7cbe04003..5f9f7ad50a 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -420,6 +420,24 @@ class AppGeneratorTest < Rails::Generators::TestCase assert_gem 'web-console' end + def test_web_console_with_dev_option + run_generator [destination_root, "--dev"] + + assert_file "Gemfile" do |content| + assert_match(/gem 'web-console',\s+github: "rails\/web-console"/, content) + assert_no_match(/gem 'web-console', '~> 2.0'/, content) + end + end + + def test_web_console_with_edge_option + run_generator [destination_root, "--edge"] + + assert_file "Gemfile" do |content| + assert_match(/gem 'web-console',\s+github: "rails\/web-console"/, content) + assert_no_match(/gem 'web-console', '~> 2.0'/, content) + end + end + def test_spring run_generator assert_gem 'spring' |