There is a method assign_user_rights which is defined in application controller in rails 3.2.8 app. In applications_controller_spec.rb, there is a test case for the method:
it "should assign_user_right" do
.....
assign_user_rights
session[:index_all_users].should be_true
end
The error:
Failure/Error: assign_user_rights
NameError:
undefined local variable or method `assign_user_rights' for #<RSpec::Core::ExampleGroup::Nested_1::Nested_4:0x57550e0>
Since assign_user_rights is defined in application controller, it should be readily visible in its spec file. However it is not the case as we see. What could be the problem with the code? Thanks.
Try using
controller.assign_user_rightsinstead