Skip to content

location is nil in display_skipped #17

@jorg-vr

Description

@jorg-vr

When upgrading from 0.5.5 to 0.6.3 we encountered the following issue:

.rvm/gems/ruby-3.3.6/gems/minitest-utils-0.6.3/lib/minitest/utils/reporter.rb:205:in `display_skipped': undefined method `map' for nil (NoMethodError)

            .map {|l| [l.path, l.lineno].join(":") }
            ^^^^
        from .rvm/gems/ruby-3.3.6/gems/minitest-utils-0.6.3/lib/minitest/utils/reporter.rb:118:in `block in print_skipped_results'
        from .rvm/gems/ruby-3.3.6/gems/minitest-utils-0.6.3/lib/minitest/utils/reporter.rb:117:in `each'
        from .rvm/gems/ruby-3.3.6/gems/minitest-utils-0.6.3/lib/minitest/utils/reporter.rb:117:in `with_index'
        from .rvm/gems/ruby-3.3.6/gems/minitest-utils-0.6.3/lib/minitest/utils/reporter.rb:117:in `print_skipped_results'
        from .rvm/gems/ruby-3.3.6/gems/minitest-utils-0.6.3/lib/minitest/utils/reporter.rb:63:in `report'
        from .rvm/gems/ruby-3.3.6/gems/minitest-5.25.5/lib/minitest.rb:1013:in `each'
        from .rvm/gems/ruby-3.3.6/gems/minitest-5.25.5/lib/minitest.rb:1013:in `report'
        from .rvm/gems/ruby-3.3.6/gems/minitest-5.25.5/lib/minitest.rb:297:in `run'
        from .rvm/gems/ruby-3.3.6/gems/minitest-5.25.5/lib/minitest.rb:86:in `block in autorun'

This happens because we skip a test by using skip() on the first line.

This is probably cause by this change in the code: v0.5.5...v0.6.3#diff-12958f949c916a841bbdc61060beb6c8949937d501e3c4b81104f928ce81261aL151

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions