Skip to content

Instantly share code, notes, and snippets.

@jimryan
Created January 9, 2012 17:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jimryan/1584077 to your computer and use it in GitHub Desktop.
Save jimryan/1584077 to your computer and use it in GitHub Desktop.
should "process :original style first" do
file = File.new(File.join(File.dirname(__FILE__), "fixtures", "50x50.png"), 'rb')
rebuild_class :styles => { :small => '100x>', :original => '42x42#' }
dummy = Dummy.new
dummy.avatar = file
dummy.save
# :small avatar should be 42px wide (processed original), not 50px (preprocessed original)
assert_equal "42", `identify -format "%w" "#{dummy.avatar.path(:small)}"`.strip
file.close
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment