From 8493f44976402b20eb7eafb487ae4213cdb48c94 Mon Sep 17 00:00:00 2001 From: NorimasaAndo Date: Sun, 14 Dec 2014 21:23:44 +0900 Subject: Fix Duplicate web-console entries in Gemfile --- railties/test/generators/app_generator_test.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'railties/test') 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' -- cgit v1.2.3