aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authoreileencodes <eileencodes@gmail.com>2016-01-28 15:22:02 -0500
committereileencodes <eileencodes@gmail.com>2016-01-28 15:23:55 -0500
commit5181d5c283430762ea444d26e72890501a6584ff (patch)
tree88a4959dca8fe31e6dda6f8d29eba339a4023e50 /actionpack
parent04de7353c2b920eb48b747c10facb6f237873a98 (diff)
downloadrails-5181d5c283430762ea444d26e72890501a6584ff.tar.gz
rails-5181d5c283430762ea444d26e72890501a6584ff.tar.bz2
rails-5181d5c283430762ea444d26e72890501a6584ff.zip
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.
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/test/controller/render_test.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb
index 2e1a687513..9430ab8db8 100644
--- a/actionpack/test/controller/render_test.rb
+++ b/actionpack/test/controller/render_test.rb
@@ -271,13 +271,14 @@ class ExpiresInRenderTest < ActionController::TestCase
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, params: { id: file.path }
end
ensure
+ file.close
file.unlink
end