From c77ca6343699af2ed9435fa7b63d59cb9843af53 Mon Sep 17 00:00:00 2001 From: Tim Kennedy Date: Sat, 18 Jul 2015 14:08:59 +1000 Subject: [PATCH] Added a test for a bug in interpolations --- spec/paperclip/interpolations_spec.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/spec/paperclip/interpolations_spec.rb b/spec/paperclip/interpolations_spec.rb index de1fe1700..9ec969ecb 100644 --- a/spec/paperclip/interpolations_spec.rb +++ b/spec/paperclip/interpolations_spec.rb @@ -250,4 +250,13 @@ def url(*args) value = Paperclip::Interpolations.interpolate(":notreal/:id/:attachment", :attachment, :style) assert_equal ":notreal/1234/attachments", value end + + it "handles question marks" do + Paperclip.interpolates :foo? do + "bar" + end + Paperclip::Interpolations.expects(:fool).never + value = Paperclip::Interpolations.interpolate(":fo/:foo?") + assert_equal ":fo/bar", value + end end