diff options
author | Carl Lerche <carllerche@mac.com> | 2010-05-06 12:02:54 +0300 |
---|---|---|
committer | Carl Lerche <carllerche@mac.com> | 2010-05-06 12:02:54 +0300 |
commit | 6d7f2790cdb6cb23285067ed2bd91fd5122adbbc (patch) | |
tree | 94fd365c22ee2b073ee725fc495f514b9a7d912f /railties/test | |
parent | 5be49884b5947d4624bdaaf9cf2629ca4dd73567 (diff) | |
download | rails-6d7f2790cdb6cb23285067ed2bd91fd5122adbbc.tar.gz rails-6d7f2790cdb6cb23285067ed2bd91fd5122adbbc.tar.bz2 rails-6d7f2790cdb6cb23285067ed2bd91fd5122adbbc.zip |
Expand paths to app builders relative to the working directory
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/generators/app_generator_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 1a93867013..8743defe82 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -238,6 +238,14 @@ class CustomAppGeneratorTest < Rails::Generators::TestCase assert_file "config.ru", %[run proc { |env| [200, { "Content-Type" => "text/html" }, ["Hello World"]] }] end + def test_builder_option_with_relative_path + here = File.expand_path(File.dirname(__FILE__)) + FileUtils.cd(here) + run_generator([destination_root, "-b", "../fixtures/lib/simple_builder.rb"]) + (DEFAULT_APP_FILES - ['config.ru']).each{ |path| assert_no_file path } + assert_file "config.ru", %[run proc { |env| [200, { "Content-Type" => "text/html" }, ["Hello World"]] }] + end + def test_builder_option_with_tweak_app_builder FileUtils.cd(Rails.root) run_generator([destination_root, "-b", "#{Rails.root}/lib/tweak_builder.rb"]) |