From: Wilson Bilkovich Date: 2006-11-15T10:10:50+09:00 Subject: Re: question about rspec assigns On 11/14/06, Daniel Higginbotham wrote: > Hi folks, > > I'm using rspec for a Rails project and keep seeing the "assigns" method in > the "writing specs" portion of the documentation, yet I don't see "assigns" > in the rdoc and I can't seem to find an explicit definition what it does. > Would someone be able to tell me what exactly "assigns" does? > Assigns is a feature RSpec borrows from the regular Rails test/unit helpers. In a controller spec, assigns[:blah] points at the @blah instance variable. Useful for setting expectations on what the controller will do with your request. Also, this is probably better suited for the RSpec mailing list.