aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorPiotr Sarnacki <drogus@gmail.com>2010-11-17 22:46:28 +0100
committerJosé Valim <jose.valim@gmail.com>2010-11-17 23:32:19 +0100
commitaafac200be0691aa97daf67b4a12ff8199dd7fe3 (patch)
tree3d6afddcf74eb16f180c73ac2728b8622598d640 /railties
parent17c7723451eba00eddbacf65e47d151e3ccafa5b (diff)
downloadrails-aafac200be0691aa97daf67b4a12ff8199dd7fe3.tar.gz
rails-aafac200be0691aa97daf67b4a12ff8199dd7fe3.tar.bz2
rails-aafac200be0691aa97daf67b4a12ff8199dd7fe3.zip
Fix generators tests on ruby 1.9
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'railties')
-rw-r--r--railties/test/application/generators_test.rb14
1 files changed, 8 insertions, 6 deletions
diff --git a/railties/test/application/generators_test.rb b/railties/test/application/generators_test.rb
index 3a3e28179a..3c52a07bdb 100644
--- a/railties/test/application/generators_test.rb
+++ b/railties/test/application/generators_test.rb
@@ -26,15 +26,17 @@ module ApplicationTests
end
test "allow running plugin new generator inside Rails app directory" do
- FileUtils.cd rails_root
- `./script/rails plugin new vendor/plugins/bukkits`
- assert File.exist?(File.join(rails_root, "vendor/plugins/bukkits/test/dummy/config/application.rb"))
+ FileUtils.cd rails_root do
+ `ruby script/rails plugin new vendor/plugins/bukkits`
+ assert File.exist?(File.join(rails_root, "vendor/plugins/bukkits/test/dummy/config/application.rb"))
+ end
end
test "don't allow running plugin_new generator as a generator" do
- FileUtils.cd rails_root
- output = `./script/rails g plugin_new vendor/plugins/bukkits`
- assert_match /This generator should not be used directly as a generator. You should use `rails plugin new` command instead/, output
+ FileUtils.cd rails_root do
+ output = `ruby script/rails g plugin_new vendor/plugins/bukkits`
+ assert_match /This generator should not be used directly as a generator. You should use `rails plugin new` command instead/, output
+ end
end
test "generators default values" do