Created
November 28, 2011 11:44
-
-
Save rhysforyou/1400106 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| describe "PUT '/books/:id'" do | |
| it "should update a Book's attributes" do | |
| @book = FactoryGirl.create(:book) | |
| new_attrs = {title: "New title", author: "New Author"} | |
| put :update, :id => @book.id, :book => new_attrs | |
| @book.reload | |
| @book.title.should eq("New title") | |
| @book.author.should eq("New Author") | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment