[rspec-users] Undefined method 'post'

Amit Kulkarni lists at ruby-forum.com
Mon Mar 8 06:12:52 EST 2010


Hello,
I am having some problem with the controllers after i updated my specs.
Following are the details:
I am trying to call create action as
post :create :user => {:name => "abc", :login => "abcd", :phone => 
11111}
After this i am searching this for confirmation i.e.
user = User.find_by_name("abc")
user.name.should == "abc"
Now when i run this i am getting an error as
You have a nil object when you didn't expect it!The error occurred while 
evaluating nil.title
 Similarly for update.I am getting that particular user from the 
fixtures and just updating the name and searching as above.But i am 
getting same error

I am using fixtures as fixtures :users
So my guess is whatever params i am passing it may be getting updated 
but again fixtures are getting uploaded.
Please suggest


-- 
Posted via http://www.ruby-forum.com/.


More information about the rspec-users mailing list