Skip to content

Minitest 5.25.2 introduces NameError: wrong constant name #289

Description

@stathis-alexander

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions