From 46db463d068d9b24c99f11a1c78dac1c1bfb45c2 Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Sat, 5 Aug 2017 12:21:21 +0900 Subject: Fix ruby warnings This fixes following warnings: ``` test/models/variant_test.rb:11: warning: ambiguous first argument; put parentheses or a space even after `/' operator lib/active_storage/attached/macros.rb:63: warning: instance variable @active_storage_attached_highlights not initialized lib/active_storage/attached/macros.rb:25: warning: instance variable @active_storage_attached_avatar not initialized ``` --- activestorage/test/models/variant_test.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'activestorage/test/models/variant_test.rb') diff --git a/activestorage/test/models/variant_test.rb b/activestorage/test/models/variant_test.rb index 7d52f005a7..04ebaccb6a 100644 --- a/activestorage/test/models/variant_test.rb +++ b/activestorage/test/models/variant_test.rb @@ -8,7 +8,7 @@ class ActiveStorage::VariantTest < ActiveSupport::TestCase test "resized variation" do variant = @blob.variant(resize: "100x100").processed - assert_match /racecar.jpg/, variant.service_url + assert_match(/racecar.jpg/, variant.service_url) image = read_image_variant(variant) assert_equal 100, image.width @@ -17,11 +17,11 @@ class ActiveStorage::VariantTest < ActiveSupport::TestCase test "resized and monochrome variation" do variant = @blob.variant(resize: "100x100", monochrome: true).processed - assert_match /racecar.jpg/, variant.service_url + assert_match(/racecar.jpg/, variant.service_url) image = read_image_variant(variant) assert_equal 100, image.width assert_equal 67, image.height - assert_match /Gray/, image.colorspace + assert_match(/Gray/, image.colorspace) end end -- cgit v1.2.3