Permalink
Browse files

Tests pass in Rubinius 1.1.0

  • Loading branch information...
1 parent fa7ee7c commit 35cdaa548d1b8439b73d5613153f9b7248bb3314 @jyurek jyurek committed Nov 12, 2010
Showing with 3 additions and 2 deletions.
  1. +2 −1 lib/paperclip/interpolations.rb
  2. +1 −1 test/attachment_test.rb
@@ -41,8 +41,9 @@ def filename attachment, style_name
# Returns the interpolated URL. Will raise an error if the url itself
# contains ":url" to prevent infinite recursion. This interpolation
# is used in the default :path to ease default specifications.
+ RIGHT_HERE = "#{__FILE__.gsub(%r{^\./}, "")}:#{__LINE__ + 3}"
def url attachment, style_name
- raise InfiniteInterpolationError if caller.any?{|b| b.index("#{__FILE__}:#{__LINE__ + 1}") }
+ raise InfiniteInterpolationError if caller.any?{|b| b.index(RIGHT_HERE) }
attachment.url(style_name, false)
end
View
@@ -606,7 +606,7 @@ def do_after_all; end
[:large, :medium, :small].each do |style|
io = @attachment.to_file(style)
# p "in commit to disk test, io is #{io.inspect} and @instance.id is #{@instance.id}"
- assert File.exists?(io)
+ assert File.exists?(io.path)
assert ! io.is_a?(::Tempfile)
io.close
end

0 comments on commit 35cdaa5

Please sign in to comment.