[rspec-users] rspec - undefined method `describe' for main:Object

Scott Taylor mailing_lists at railsnewbie.com
Sat Oct 11 00:01:16 EDT 2008


On Oct 10, 2008, at 11:50 PM, Mano ah wrote:

> How to solve the below error
>
> 1)
> NoMethodError in 'LoginController index should get successfully'
> You have a nil object when you didn't expect it!
> The error occurred while evaluating nil.status
> ./login_controller_spec.rb:9:
>
> 2)
> NoMethodError in 'LoginController index should render 202 file'
> undefined method `render_template' for
> #<Spec::Example::ExampleGroup::Subclass_1
> :0x47bc128>
> ./login_controller_spec.rb:13:


Looks like you're writing controller specs.  Have you checked out the  
rspec site?  Specifically:

http://rspec.info/documentation/rails/writing/controllers.html

Scott



More information about the rspec-users mailing list