From a7a376a6fa9867f4b1af2d7d12dd22d7042c5fe6 Mon Sep 17 00:00:00 2001 From: eileencodes Date: Thu, 28 Jan 2016 15:22:02 -0500 Subject: Run `file.close` before unlinking for travis This works on OSX but for some reason travis is throwing a ``` 1) Error: ExpiresInRenderTest#test_dynamic_render_with_absolute_path: NoMethodError: undefined method `unlink' for nil:NilClass ``` Looking at other tests in Railties the file has a name and we close it before unlinking, so I'm going to try that. --- actionpack/test/controller/render_test.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb index 90fe2fb653..355523293f 100644 --- a/actionpack/test/controller/render_test.rb +++ b/actionpack/test/controller/render_test.rb @@ -254,13 +254,14 @@ class TestController < ActionController::Base end def test_dynamic_render_with_absolute_path - file = Tempfile.new + file = Tempfile.new('name') file.write "secrets!" file.flush assert_raises ActionView::MissingTemplate do response = get :dynamic_render, { :id => file.path } end ensure + file.close file.unlink end -- cgit v1.2.3