ruralocity/everyday_rails_rspec_rails_3_2

Incorrect PUT request spec, PDF page 53

ruralocity opened this issue · 1 comments

The expectation on @message's attributes should be to_not instead of to:

it "does not change @message's attributes" do
  put :update, id: @message,
    message: attributes_for(:message,
      name: "None of your business",
        email: nil)
  @message.reload
  expect(@message.name).to_not eq("None of your business")
end

Fixed this in an update currently in Leanpub's virtual presses; will be available for download in a few minutes.