aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2011-06-25 12:12:49 -0700
committerSantiago Pastorino <santiago@wyeworks.com>2011-06-25 12:12:49 -0700
commit095f0466c880e802c287e899e4ed645e44453484 (patch)
tree756b83ca83ef43a9ce712bd3fc8dc9f1ffa7b537 /actionpack/test
parent211fa2d28d0f8a875792e078e1fca3718649de3c (diff)
parenta7af1e0051c5fae0a851a9c7f84892573639e5c5 (diff)
downloadrails-095f0466c880e802c287e899e4ed645e44453484.tar.gz
rails-095f0466c880e802c287e899e4ed645e44453484.tar.bz2
rails-095f0466c880e802c287e899e4ed645e44453484.zip
Merge pull request #1861 from dchelimsky/fixture_path
Get the fixture_path from self.class instead of ActiveSupport::TestCase.
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/controller/test_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/controller/test_test.rb b/actionpack/test/controller/test_test.rb
index 6265e78030..043d44500a 100644
--- a/actionpack/test/controller/test_test.rb
+++ b/actionpack/test/controller/test_test.rb
@@ -649,6 +649,13 @@ XML
end
+ def test_fixture_path_is_accessed_from_self_instead_of_active_support_test_case
+ TestTest.stubs(:fixture_path).returns(FILES_DIR)
+
+ uploaded_file = fixture_file_upload('/mona_lisa.jpg', 'image/png')
+ assert_equal File.open("#{FILES_DIR}/mona_lisa.jpg", READ_PLAIN).read, uploaded_file.read
+ end
+
def test_test_uploaded_file_with_binary
filename = 'mona_lisa.jpg'
path = "#{FILES_DIR}/#{filename}"