spec/paperclip/url_generator_spec.rb in kt-paperclip-6.3.0 vs spec/paperclip/url_generator_spec.rb in kt-paperclip-6.4.0
- old
+ new
@@ -192,9 +192,19 @@
assert mock_interpolator.has_interpolated_pattern?(expected),
"expected the interpolator to be passed #{expected.inspect} but it wasn't"
end
+ it "doesn't emit deprecation warnings" do
+ expected = "the expected result"
+ mock_interpolator = MockInterpolator.new(result: expected)
+ options = { interpolator: mock_interpolator }
+ mock_attachment = MockAttachment.new(options)
+ url_generator = Paperclip::UrlGenerator.new(mock_attachment)
+
+ expect { url_generator.for(:style_name, escape: true) }.to_not(output(/URI\.(un)?escape is obsolete/).to_stderr)
+ end
+
describe "should be able to escape (, ), [, and ]." do
def generate(expected, updated_at = nil)
mock_interpolator = MockInterpolator.new(result: expected)
options = { interpolator: mock_interpolator, updated_at: updated_at }
mock_attachment = MockAttachment.new(options)