diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2017-07-21 16:45:55 -0500 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2017-07-21 16:45:55 -0500 |
commit | f3b092a6e6f6d873e14ebe1e612028ef7ac15e4a (patch) | |
tree | 625c596233458216177836fd0e159557c2541adb /test/test_helper.rb | |
parent | e9cf92cc399a169ec47496da198cfb984856000d (diff) | |
download | rails-f3b092a6e6f6d873e14ebe1e612028ef7ac15e4a.tar.gz rails-f3b092a6e6f6d873e14ebe1e612028ef7ac15e4a.tar.bz2 rails-f3b092a6e6f6d873e14ebe1e612028ef7ac15e4a.zip |
Test actual transformation via controller too
Diffstat (limited to 'test/test_helper.rb')
-rw-r--r-- | test/test_helper.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/test_helper.rb b/test/test_helper.rb index 69ba76b9c4..20b22049b3 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -39,6 +39,12 @@ class ActiveSupport::TestCase io: File.open(File.expand_path("../fixtures/files/#{filename}", __FILE__)), filename: filename, content_type: content_type end + + def assert_same_image(fixture_filename, variant) + assert_equal \ + File.binread(File.expand_path("../fixtures/files/#{fixture_filename}", __FILE__)), + File.binread(variant.service.send(:path_for, variant.key)) + end end require "action_controller" |