rspec_rails_4
rspec_rails_4 copied to clipboard
Ch.5, p.50 - Minor naming inconsistency in spec
The PUT #update spec on page 50 has a minor inconsistency in naming:
describe 'PUT #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
In the first spec it says updates the contact in the database while the second spec just says does not update the contact but fails to specify where the update should not occur (in the database). This is a very minor thing, really.
Book version: 2013-10-29 (PDF)