-
-
Save mattwynne/341831 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
require 'spec_helper' | |
describe PhotoAlbum do | |
describe 'adding a new photo' do | |
describe "when the album has no photos" do | |
before(:each) do | |
@photo_album = stub_model(PhotoAlbum) | |
end | |
it "should set the cover of the album to be the new photo" do | |
photo = stub_model(Photo) | |
@photo_album.photos << photo | |
@photo_album.cover.should == photo | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment