rspec_rails_4 icon indicating copy to clipboard operation
rspec_rails_4 copied to clipboard

Ch.5 p.50 and p.57 - Different examples

Open JunichiIto opened this issue 11 years ago • 1 comments

In Ch.5 p.50 and p.57, both describe "PATCH#update" but they have different examples.

JunichiIto avatar Jan 17 '14 22:01 JunichiIto

At page 46/47 you have:

describe 'PATCH #update' do
  context "with valid attributes" do
    it "updates the contact in the database"
    it "redirects to the contact"
  end
  context "with invalid attributes" do
    it "does not update the contact"
    it "re-renders the #edit template"
  end
end

However, at page 53 you have:

context "valid attributes" do
  it "locates the requested @contact"
  it "changes @contact's attributes"
  it "redirects to the updated contact"
end
context "with invalid attributes" do
  it "does not change the contact's attributes"
  it "re-renders the edit template"
end

So sad that this inconsistency is still there... Please fix this.

AlbertVilaCalvo avatar Sep 15 '14 16:09 AlbertVilaCalvo