search for: msg01570

Displaying 1 result from an estimated 1 matches for "msg01570".

Did you mean: msg01560
2010 Nov 02
7
Testing attr_accessible (and/or attr_protected)
I''ve been puzzling over how to test that attr_accessible has been set for the correct columns; but the tests I''ve come up with so far seem to fail to fail when I expect. I came across this old message from this list: http://www.mail-archive.com/rspec-users at rubyforge.org/msg01570.html Which seemed like a plausible example, but my attempt (modeled on the example) doesn''t work: describe Article, ''protected attributes'' do it ''should deny mass-assignment to the user_id'' do lambda { article.update_attributes(:person_id =...