aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators/testing
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/generators/testing')
-rw-r--r--railties/lib/rails/generators/testing/assertions.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/generators/testing/assertions.rb b/railties/lib/rails/generators/testing/assertions.rb
index 6267b2f2ee..cc88e830dd 100644
--- a/railties/lib/rails/generators/testing/assertions.rb
+++ b/railties/lib/rails/generators/testing/assertions.rb
@@ -21,7 +21,7 @@ module Rails
# end
# end
def assert_file(relative, *contents)
- absolute = File.expand_path(relative, destination_root)
+ absolute = File.expand_path(relative, destination_root).shellescape
assert File.exists?(absolute), "Expected file #{relative.inspect} to exist, but does not"
read = File.read(absolute) if block_given? || !contents.empty?