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

Minitest 5.25.2 introduces NameError: wrong constant name #289

Open
stathis-alexander opened this issue Dec 29, 2024 · 0 comments
Open

Minitest 5.25.2 introduces NameError: wrong constant name #289

stathis-alexander opened this issue Dec 29, 2024 · 0 comments

Comments

@stathis-alexander
Copy link

stathis-alexander commented Dec 29, 2024

When running tests with minitest 5.25.1, we see no errors. After bumping minitest to 5.25.2, all tests using shoulda-context fail with a similar message:

Error:
[TestDescription] :
NameError: wrong constant name
    /usr/local/bundle/gems/shoulda-context-2.0.0/lib/shoulda/context/dsl.rb:206:in `const_get'
    /usr/local/bundle/gems/shoulda-context-2.0.0/lib/shoulda/context/dsl.rb:206:in `block in described_type'
    /usr/local/bundle/gems/shoulda-context-2.0.0/lib/shoulda/context/dsl.rb:205:in `each'
    /usr/local/bundle/gems/shoulda-context-2.0.0/lib/shoulda/context/dsl.rb:205:in `inject'
    /usr/local/bundle/gems/shoulda-context-2.0.0/lib/shoulda/context/dsl.rb:205:in `described_type'
    /usr/local/bundle/gems/shoulda-context-2.0.0/lib/shoulda/context/dsl.rb:273:in `construct_subject'
    /usr/local/bundle/gems/shoulda-context-2.0.0/lib/shoulda/context/dsl.rb:248:in `subject'
    /usr/local/bundle/gems/shoulda-context-2.0.0/lib/shoulda/context/context.rb:76:in `block in should_not'
    /usr/local/bundle/gems/shoulda-context-2.0.0/lib/shoulda/context/context.rb:84:in `instance_exec'
    /usr/local/bundle/gems/shoulda-context-2.0.0/lib/shoulda/context/context.rb:84:in `block in create_test_from_should_hash'

bin/rails test /usr/local/bundle/gems/shoulda-context-2.0.0/lib/shoulda/context/context.rb:76

I believe this issue may have been introduced in minitest/minitest#1017.

@stathis-alexander stathis-alexander changed the title NameError: wrong constant name Minitest 5.25.2 introduces NameError: wrong constant name Dec 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant