diff options
author | eileencodes <eileencodes@gmail.com> | 2016-01-28 15:22:02 -0500 |
---|---|---|
committer | eileencodes <eileencodes@gmail.com> | 2016-01-28 15:51:06 -0500 |
commit | a7a376a6fa9867f4b1af2d7d12dd22d7042c5fe6 (patch) | |
tree | b57ccd54f95322fa1be7ca0737a524f6363140b5 /actionpack | |
parent | 457de3757e7c1af9e1c99b9021951c04c9d83ace (diff) | |
download | rails-a7a376a6fa9867f4b1af2d7d12dd22d7042c5fe6.tar.gz rails-a7a376a6fa9867f4b1af2d7d12dd22d7042c5fe6.tar.bz2 rails-a7a376a6fa9867f4b1af2d7d12dd22d7042c5fe6.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.rb | 3 |
1 files changed, 2 insertions, 1 deletions
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 |