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

NameError: uninitialized constant Routing #1158

Closed
sonalkr132 opened this issue Dec 12, 2018 · 7 comments
Closed

NameError: uninitialized constant Routing #1158

sonalkr132 opened this issue Dec 12, 2018 · 7 comments

Comments

@sonalkr132
Copy link
Contributor

I have following test:

class RoutingTest < ActionDispatch::IntegrationTest
    should route(:get, '/v1/test/hello').to('api/v1/test#hello')
end

in test_helper.rb

Shoulda::Matchers.configure do |config|
  config.integrate do |with|
    with.test_framework :minitest
    with.library :rails
  end
end

On running test I get following:

NameError: uninitialized constant Routing                                                                                                                              
bin/rails test /home/aditya/.rvm/gems/ruby-2.3.5/gems/shoulda-context-1.2.2/lib/shoulda/context/context.rb:346                                                         

I am using should-matcher 3.2.1 and rails 5.2.1.1

@sonalkr132
Copy link
Contributor Author

Related #953

@mcmire
Copy link
Collaborator

mcmire commented Dec 12, 2018

This is still a current bug, but try adding this to the top of your test class:

extend Shoulda::Matchers::Routing

@sonalkr132
Copy link
Contributor Author

Doesn't help. I have tried all your suggestions on #953, including replacing this with ActionDispatch::IntegrationTest.

@mcmire
Copy link
Collaborator

mcmire commented Dec 28, 2018

@sonalkr132 Can you provide me with a backtrace so I can see where this error is occurring?

@sonalkr132
Copy link
Contributor Author

NameError: uninitialized constant Routing                                                                                                                              
bin/rails test /home/aditya/.rvm/gems/ruby-2.3.5/gems/shoulda-context-1.2.2/lib/shoulda/context/context.rb:346                                                         

is all of it.

@mcmire
Copy link
Collaborator

mcmire commented Dec 31, 2018

@sonalkr132 Wow, that's super odd. I just noticed your comments on the rubygems PR you created — I'm not sure why I didn't notice that before — so I'll see if I can reproduce that there.

@mcmire
Copy link
Collaborator

mcmire commented May 6, 2020

Hey folks. In an effort to lighten our load as maintainers and be able to serve you better in the future, the shoulda-matchers team is working on cleaning out the cobwebs in this repo by pruning the backlog. As there are few of us, there are a lot of items that will simply never earn our attention in a reasonable time frame, and rather than giving you an empty promise, we think it makes more sense to focus on more recent issues. That means, unfortunately, that we must close this issue.

Don't take this the wrong way: our aim is not to diminish the effort people have made or dismiss problems that have been raised. If you feel that we should reopen this issue, then please let us know so that we can reprioritize it. Thanks!

@mcmire mcmire closed this as completed May 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants