From 6074d0f6d30bf3be8c6d73f336be6d21115c2f75 Mon Sep 17 00:00:00 2001 From: Diego Carrion Date: Wed, 17 Jun 2015 13:53:19 -0300 Subject: assert_file understands paths with special characters fixes #20042 --- railties/lib/rails/generators/testing/assertions.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/lib/rails') diff --git a/railties/lib/rails/generators/testing/assertions.rb b/railties/lib/rails/generators/testing/assertions.rb index bd069e4bd0..17af6eddfa 100644 --- a/railties/lib/rails/generators/testing/assertions.rb +++ b/railties/lib/rails/generators/testing/assertions.rb @@ -23,7 +23,7 @@ module Rails # end # end def assert_file(relative, *contents) - absolute = File.expand_path(relative, destination_root).shellescape + absolute = File.expand_path(relative, destination_root) assert File.exist?(absolute), "Expected file #{relative.inspect} to exist, but does not" read = File.read(absolute) if block_given? || !contents.empty? -- cgit v1.2.3