diff options
author | Yves Senn <yves.senn@gmail.com> | 2015-06-19 11:13:16 +0200 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2015-06-19 11:25:03 +0200 |
commit | e97b8cb15f59cff0943056772258ae16c7d9e7d8 (patch) | |
tree | d11963faaccee8c3bf226223a4d70bddc6871f28 /railties/test | |
parent | ee066afd188edb4c30a40f736c5f9bd0e9960fb3 (diff) | |
parent | 6074d0f6d30bf3be8c6d73f336be6d21115c2f75 (diff) | |
download | rails-e97b8cb15f59cff0943056772258ae16c7d9e7d8.tar.gz rails-e97b8cb15f59cff0943056772258ae16c7d9e7d8.tar.bz2 rails-e97b8cb15f59cff0943056772258ae16c7d9e7d8.zip |
Merge pull request #20605 from dcrec1/assert_file
assert_file understands paths with special characters
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/generators/app_generator_test.rb | 2 | ||||
-rw-r--r-- | railties/test/railties/generators_test.rb | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index fc05127fb5..daf362357c 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -499,7 +499,7 @@ class AppGeneratorTest < Rails::Generators::TestCase end def test_application_name_with_spaces - path = File.join(destination_root, "foo bar".shellescape) + path = File.join(destination_root, "foo bar") # This also applies to MySQL apps but not with SQLite run_generator [path, "-d", 'postgresql'] diff --git a/railties/test/railties/generators_test.rb b/railties/test/railties/generators_test.rb index 423ece277e..5f4171d44b 100644 --- a/railties/test/railties/generators_test.rb +++ b/railties/test/railties/generators_test.rb @@ -122,5 +122,13 @@ module RailtiesTests assert_no_file "app/helpers/foo_bar/topics_helper.rb" end end + + def test_assert_file_with_special_characters + path = "#{app_path}/tmp" + file_name = "#{path}/v0.1.4~alpha+nightly" + FileUtils.mkdir_p path + FileUtils.touch file_name + assert_file file_name + end end end |