aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
authorArun Agrawal <arunagw@gmail.com>2014-08-08 13:28:06 +0200
committerArun Agrawal <arunagw@gmail.com>2014-08-08 19:50:25 +0200
commit301b5fd52265298e1fe16a7914bc656c808d931e (patch)
tree689a181a2da16b786c104921a809c8bb8c5a8730 /railties/test
parent30529dc00f96777c325dff496930f560fb9d59e9 (diff)
downloadrails-301b5fd52265298e1fe16a7914bc656c808d931e.tar.gz
rails-301b5fd52265298e1fe16a7914bc656c808d931e.tar.bz2
rails-301b5fd52265298e1fe16a7914bc656c808d931e.zip
Fixes test for Gemfile entry changes
Broken by fbe38c9e9d4fe9f82518e8ffc1d757459b0c5f1c
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/generators/app_generator_test.rb17
1 files changed, 11 insertions, 6 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb
index 3f31f89473..70c439672f 100644
--- a/railties/test/generators/app_generator_test.rb
+++ b/railties/test/generators/app_generator_test.rb
@@ -299,7 +299,7 @@ class AppGeneratorTest < Rails::Generators::TestCase
if defined?(JRUBY_VERSION)
assert_gem "therubyrhino"
else
- assert_file "Gemfile", /# gem\s+["']therubyracer["']+, \s+platforms: :ruby$/
+ assert_file "Gemfile", /# gem 'therubyracer', platforms: :ruby/
end
end
@@ -340,7 +340,7 @@ class AppGeneratorTest < Rails::Generators::TestCase
def test_inclusion_of_jbuilder
run_generator
- assert_file "Gemfile", /gem 'jbuilder'/
+ assert_gem 'jbuilder'
end
def test_inclusion_of_a_debugger
@@ -351,9 +351,9 @@ class AppGeneratorTest < Rails::Generators::TestCase
assert_no_match(/debugger/, content)
end
elsif RUBY_VERSION < '2.0.0'
- assert_file "Gemfile", /# gem 'debugger'/
+ assert_gem 'debugger'
else
- assert_file "Gemfile", /# gem 'byebug'/
+ assert_gem 'byebug'
end
end
@@ -419,9 +419,14 @@ class AppGeneratorTest < Rails::Generators::TestCase
assert_file "foo bar/config/initializers/session_store.rb", /key: '_foo_bar/
end
+ def test_web_console
+ run_generator
+ assert_gem 'web-console'
+ end
+
def test_spring
run_generator
- assert_file "Gemfile", /gem 'spring', \s+group: :development/
+ assert_gem 'spring'
end
def test_spring_binstubs
@@ -523,6 +528,6 @@ class AppGeneratorTest < Rails::Generators::TestCase
end
def assert_gem(gem)
- assert_file "Gemfile", /^gem\s+["']#{gem}["']$/
+ assert_file "Gemfile", /^\s*gem\s+["']#{gem}["']$*/
end
end