Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails 5 request specs login_user method undefined #106

Closed
margOnline opened this issue Feb 3, 2018 · 7 comments
Closed

Rails 5 request specs login_user method undefined #106

margOnline opened this issue Feb 3, 2018 · 7 comments
Labels
bug Something isn't working question Asking a question about Sorcery

Comments

@margOnline
Copy link

Using Rails 5.0.6, RSpec 3.7.2, Sorcery 0.11.0, I get undefined method 'login_user' in my request specs. I've used a workaround based on the response by chrisdurheim in NoamB issue 775.

Is there any plan for updating the test helpers for use in Rails 5 request specs?

@ebihara99999
Copy link
Contributor

ebihara99999 commented Feb 3, 2018

Thank you for opening the issue. @margOnline

The problem is fixed in this PR, but for some reasons codacy fails, not merged.
I will try understanding the reason and fix it, though I'm not sure when it is. If you like to use the helper soon, do monkey patch followed by my PR or use Sorcery of my branch opened PR in.

@margOnline
Copy link
Author

Thanks for your response @ebihara99999. I'll follow that pr.

@ebihara99999
Copy link
Contributor

Don't hesitate to tell me if you have another problem with it.

@RobBikmansurov
Copy link

I also try to test with Rspec 3.7 and Rails 5.1.3, but my first problem is this:
undefined method authenticates_with_sorcery!' for #Class:0x00562646a233f8`

my app/model/user.rb:
`class User < ApplicationRecord

authenticates_with_sorcery!

...`

Can you tell me what to do?

@margOnline
Copy link
Author

@RobBikmansurov your problem is not related to this issue. I suggest you post your question somewhere like Stackflow and be sure to provide more information than you have here. You may also want to check here, here and here.

@joshbuker
Copy link
Member

Hi @margOnline, is this still relevant? I don't recall any PRs coming through for this particular issue, so I'm assuming it probably still is.

@joshbuker
Copy link
Member

No movement, closing for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Asking a question about Sorcery
Projects
None yet
Development

No branches or pull requests

4 participants