Browse files

Fix generators tests on ruby 1.9

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
1 parent 17c7723 commit aafac200be0691aa97daf67b4a12ff8199dd7fe3 @drogus drogus committed with josevalim Nov 17, 2010
Showing with 8 additions and 6 deletions.
  1. +8 −6 railties/test/application/generators_test.rb
View
14 railties/test/application/generators_test.rb
@@ -26,15 +26,17 @@ def with_bare_config
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

0 comments on commit aafac20

Please sign in to comment.