Ruby on Rails Sunday, July 9, 2017

On Sat, Jul 8, 2017 at 11:26 PM, Ralph Shnelvar <> wrote:

> I'm converting some code from Rails 4 to Rails 5.1.1 so that may be where
> the following problems lies.
> Part of the Rspec messages I'm getting is:
> 1) ArticlesController GET #new returns a success response
> Failure/Error: get :new, {}, valid_session
> ArgumentError:
> wrong number of arguments (given 2, expected 1)

> describe "GET #new" do
> it "returns a success response" do
> byebug
> get :new, {}, valid_session

replace the line above with:

get :new, params: {}, session: valid_session

> expect(response).to be_success
> end
> end

I *believe* if you'd gone through converting to Rails 5.0 first you'd
have seen deprecation warnings about that. I think :-)

In any case, HTH.
Hassan Schroeder ------------------------
twitter: @hassan
Consulting Availability : Silicon Valley or remote

You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
To view this discussion on the web visit
For more options, visit

No comments:

Post a Comment