Skip to content

Instantly share code, notes, and snippets.

@carlisia
Created October 29, 2008 16:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save carlisia/20730 to your computer and use it in GitHub Desktop.
Save carlisia/20730 to your computer and use it in GitHub Desktop.
require File.dirname(__FILE__) + '/../test_helper'
class PhotoTest < ActiveSupport::TestCase
# FIXME: http://thoughtbot.lighthouseapp.com/projects/8794/tickets/35-should_have_attached_file - AVS
should_have_attached_file :image
should_belong_to :property
end
class Photo < ActiveRecord::Base
has_attached_file :image,
:styles => { :medium => "500", :thumb => "150x150#" },
:path => ":rails_root/public/assets/images/:id/:style.:extension",
:url => "/assets/images/:id/:style.:extension"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment