[rspec-users] works in script but not in rake

Jonathan Linowes jonathan at parkerhill.com
Wed Oct 17 01:13:13 EDT 2007


btw I just noticed the text of the example is a typo, it -is- a GET  
called in the spec with

     get :accept, :project_id => @project.id, :id => @mem.id


On Oct 17, 2007, at 1:01 AM, Jonathan Linowes wrote:

> Hi,
>
> This is weird
>
> All my current spec examples are passing (about 750 of 'em) except  
> a set of 6 in a specific controller spec. I get the following  
> failure on each 6 when I run it via
>    $ rake spec
> for example:
> ---
> ActionController::UnknownAction in 'MembershipsController handling  
> PUT /project/ID/membership/N/accept should flash message'
> No action responded to accept
> ---
>
> but if I run the spec file individually, all the examples pass with  
> no failures
>    $ script/spec --color --format specdoc spec/controllers/ 
> memberships_controller_spec.rb
>
> My routes.rb contains
>
>   map.resources :projects do |project|
>     project.resources :memberships, :member => { :accept => :get }
> ...
>   end
>
> but I have other resources with :member actions defined and they  
> spec ok
>
> This is completely repeatable.
>
> Any ideas?
>
> I'm running with an older version of rails edge (7310)
> and the latest trunk rspec and rspec_on_rails (updated this evening)
>
> linoj
>
>
>
>
>
>
>



More information about the rspec-users mailing list