[rspec-users] Undefined method 'post'

Amit Kulkarni lists at ruby-forum.com
Fri Mar 5 08:03:59 EST 2010


Amit Kulkarni wrote:
> Hello all,
> I am facing a strange problem.
> I have generated rspec for a particular project.Similarly created a spec
> controller.Under that controller i have written post :create action
> When i run my spec i get an error as
> "undefined method `post' for
> #<Spec::Rails::Example::RailsExampleGroup::Subclass_1::Subclass_1:0xb693fb3c>"
> 
> Strangely my models are working fine.My rails version is 2.3.5 and rspec
> version is 1.1.12
> I tried in some other project,in that i am getting error as "Undefined
> method controller for nil class"
> Earlier it was working fine,but dont know what is the problem.
> Please suggest.
I created a fresh application and tried to write simple user signup 
controller.
But when i tried to run then it is showing the same error as undefined 
method "post"
Please suggest
-- 
Posted via http://www.ruby-forum.com/.


More information about the rspec-users mailing list