rspec / rails - "assigns"

The "assigns" method is actually a Rails method that dives into a Controller and grabs an instance variable.

e.g.

Controller

def controller_action

  @rehearsals = Rehearsals.all

end

 

instance_variable_that_I_want_for_example_to_test = assigns(:rehearsals)

| Back

Footerfull