Created
March 2, 2011 00:15
-
-
Save russ/850195 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
subject do | |
Course.create!({:title => 'Test Course', :image => File.open(File.join(Rails.root, 'public', 'images', 'test-image.gif'))}) | |
end | |
describe "when an image is attached" do | |
it "should respond to an image object" do | |
subject.image.class.should == Paperclip::Attachment | |
end | |
it "should have a vaild image that's not missing" do | |
subject.image.url.should_not match(/missing\.png$/) | |
end | |
it "should have the large size set as default" do | |
subject.image.url(:large).should == subject.image.url | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment