>      Failure/Error: get
> edit_account_activation_path(@user.activation_token)
>
>
>      ActionController::UrlGenerationError:
>        No route matches
> {:action=>"/account_activations/11291f1553b269c585e0a1b7e87fbe10/edit",
> :controller=>"account_activations"}
>
>      # ./spec/controllers/account_activations_controller_spec.rb:11:in
> `block (3 levels) in <top (required)>'
>
>
There's a difference between `get` in controller specs (backed by
https://github.com/rails/rails/blob/36b44ca9f755be908874dc1994ca75fe03fd35c0/actionpack/lib/action_controller/test_case.rb#L401)
and `get` in request specs (backed by
https://github.com/rails/rails/blob/ac6aa32f7cf66264ba87eabed7c042bb60bcf3a2/actionpack/lib/action_dispatch/testing/integration.rb#L14
).

https://relishapp.com/rspec/rspec-rails/v/4-0/docs/controller-specs vs
https://relishapp.com/rspec/rspec-rails/v/4-0/docs/request-specs/request-spec

To pass a parameter in a controller spec, use:

    get :show, params: { id: 7 }

Hope this helps.

-- 
You received this message because you are subscribed to the Google Groups 
"rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rspec/CAAk5Ok_AaAu4YPA%2BhA-ZxC2uwbdB30vjPUYFizdCpOe8cars7Q%40mail.gmail.com.

Reply via email to