[rspec-devel] [ rspec-Feature Requests-9786 ] infer controller and helper names from the described type

Scott Taylor mailing_lists at railsnewbie.com
Sun Apr 8 17:05:59 EDT 2007


I'm not specifying the controller name in one of my controller specs  
and am getting this:

1)
'POST /users/1/terms/1 - UPDATE should be successful' FAILED
   You have to declare the controller name in controller specs. For  
example:
     context "The ExampleController" do
       controller_name "example" #invokes the ExampleController
     end

I've got trunk checked out in my plugins directory.  Do you know why  
I'd have this problem?

Scott



On Apr 3, 2007, at 11:48 PM, <noreply at rubyforge.org>   
<noreply at rubyforge.org> wrote:

> Feature Requests item #9786, was opened at 2007-04-03 15:16
> You can respond by visiting:
> http://rubyforge.org/tracker/? 
> func=detail&atid=3152&aid=9786&group_id=797
>
> Category: rails plugin
> Group: None
>> Status: Closed
> Priority: 3
> Submitted By: David Chelimsky (dchelimsky)
>> Assigned to: David Chelimsky (dchelimsky)
> Summary: infer controller and helper names from the described type
>
> Initial Comment:
> Now that we can do this:
>
>   describe SomeThingController do
>
> it seems a shame to require this:
>
>     controller_name :some_thing
>
> Controller Behavoiurs could be smart enough to see if a type is  
> passed to #describe, and if it is a subclass of  
> ActionController::Base, in which case it doesn't need to require  
> controller_name
>
> Same goes for Helper Behaviours.
>
> ----------------------------------------------------------------------
>
>> Comment By: David Chelimsky (dchelimsky)
> Date: 2007-04-04 03:48
>
> Message:
> Added in branches/0.9-dev (rev 1685)
>
> ----------------------------------------------------------------------
>
> You can respond by visiting:
> http://rubyforge.org/tracker/? 
> func=detail&atid=3152&aid=9786&group_id=797
> _______________________________________________
> rspec-devel mailing list
> rspec-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-devel



More information about the rspec-devel mailing list