I am new on Rails and Rspec. My Rspec file is not taking a Controller's property(as-instance variable)
assigns[:portal_news].should be_new_record
It always gives the error:
You have a nil object when you didn't expect it!
You might have expected an instance of ActiveRecord::Base.
The error occurred while evaluating nil.new_record?
Can anyone find the solution to this problem?