aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators
diff options
context:
space:
mode:
authorPrem Sichanugrist <s@sikachu.com>2012-02-01 13:09:33 -0500
committerPrem Sichanugrist <s@sikachu.com>2012-02-01 13:09:33 -0500
commitb673ca68f1d8e061dc9d4819bc0a1ba4935b2671 (patch)
tree77b1c3a3da3b606911f2b01fcea1088c87284e39 /railties/test/generators
parent0696a514bc5809cb77a6bd730277fd776e3f4475 (diff)
downloadrails-b673ca68f1d8e061dc9d4819bc0a1ba4935b2671.tar.gz
rails-b673ca68f1d8e061dc9d4819bc0a1ba4935b2671.tar.bz2
rails-b673ca68f1d8e061dc9d4819bc0a1ba4935b2671.zip
Fix plugin_new test failure from c8c84397
`plugin_new` generator doesn't generate `sass-rails` in the Gemfile, so you can't check for that.
Diffstat (limited to 'railties/test/generators')
-rw-r--r--railties/test/generators/app_generator_test.rb7
-rw-r--r--railties/test/generators/shared_generator_tests.rb3
2 files changed, 7 insertions, 3 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb
index a4589c49f4..385f00d331 100644
--- a/railties/test/generators/app_generator_test.rb
+++ b/railties/test/generators/app_generator_test.rb
@@ -133,6 +133,13 @@ class AppGeneratorTest < Rails::Generators::TestCase
end
end
+ def test_edge_gemfile_option
+ generator([destination_root], :edge => true).expects(:bundle_command).with('install').once
+ quietly { generator.invoke_all }
+ assert_file 'Gemfile', %r{^\s+gem\s+["']sass-rails["'],\s+:git\s+=>\s+["']#{Regexp.escape("git://github.com/rails/sass-rails.git")}["']$}
+ assert_file 'Gemfile', %r{^\s+gem\s+["']coffee-rails["'],\s+:git\s+=>\s+["']#{Regexp.escape("git://github.com/rails/coffee-rails.git")}["']$}
+ end
+
def test_config_database_is_added_by_default
run_generator
assert_file "config/database.yml", /sqlite3/
diff --git a/railties/test/generators/shared_generator_tests.rb b/railties/test/generators/shared_generator_tests.rb
index b558ef8276..2ae3ec706e 100644
--- a/railties/test/generators/shared_generator_tests.rb
+++ b/railties/test/generators/shared_generator_tests.rb
@@ -128,9 +128,6 @@ module SharedGeneratorTests
assert_file 'Gemfile', %r{^gem\s+["']rails["'],\s+:git\s+=>\s+["']#{Regexp.escape("git://github.com/rails/rails.git")}["']$}
assert_file 'Gemfile', %r{^gem\s+["']journey["'],\s+:git\s+=>\s+["']#{Regexp.escape("git://github.com/rails/journey.git")}["']$}
assert_file 'Gemfile', %r{^gem\s+["']arel["'],\s+:git\s+=>\s+["']#{Regexp.escape("git://github.com/rails/arel.git")}["']$}
-
- assert_file 'Gemfile', %r{^\s+gem\s+["']sass-rails["'],\s+:git\s+=>\s+["']#{Regexp.escape("git://github.com/rails/sass-rails.git")}["']$}
- assert_file 'Gemfile', %r{^\s+gem\s+["']coffee-rails["'],\s+:git\s+=>\s+["']#{Regexp.escape("git://github.com/rails/coffee-rails.git")}["']$}
end
def test_skip_gemfile