Skip to content

Commit

Permalink
Use require_relative instead of require
Browse files Browse the repository at this point in the history
Follow up faee2dd

This commit fixes the following error:

```console
$ bundle exec minitest-queue test/**/*.rb
Starting test-queue master (/tmp/test_queue_5033_1580.sock)
/Users/koic/src/github.com/rubocop/rubocop-minitest/test/rubocop/cop/minitest/no_test_cases_test.rb:3:
in `require': cannot load such file -- test_helper (LoadError)
        from /Users/koic/src/github.com/rubocop/rubocop-minitest/test/rubocop/cop/minitest/no_test_cases_test.rb:3:
        in `<top (required)>'
        from /Users/koic/src/github.com/tmm1/test-queue/lib/test_queue/runner/minitest5.rb:87:in `require'
        from /Users/koic/src/github.com/tmm1/test-queue/lib/test_queue/runner/minitest5.rb:87:in `suites_from_file'
        from /Users/koic/src/github.com/tmm1/test-queue/lib/test_queue/runner.rb:332:
        in `block (2 levels) in discover_suites'
        from /Users/koic/src/github.com/tmm1/test-queue/lib/test_queue/runner.rb:331:in `each'
        from /Users/koic/src/github.com/tmm1/test-queue/lib/test_queue/runner.rb:331:in `block in discover_suites'
        from /Users/koic/src/github.com/tmm1/test-queue/lib/test_queue/runner.rb:325:in `fork'
        from /Users/koic/src/github.com/tmm1/test-queue/lib/test_queue/runner.rb:325:in `discover_suites'
        from /Users/koic/src/github.com/tmm1/test-queue/lib/test_queue/runner.rb:243:in `execute_internal'
        from /Users/koic/src/github.com/tmm1/test-queue/lib/test_queue/runner.rb:135:in `execute'
        from /Users/koic/src/github.com/tmm1/test-queue/exe/minitest-queue:8:in `<top (required)>'
```
  • Loading branch information
koic committed Mar 25, 2023
1 parent f63e45d commit 18e39e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/rubocop/cop/minitest/no_test_cases_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require 'test_helper'
require_relative '../../../test_helper'

class NoTestCases < Minitest::Test
def test_registers_offense_for_empty_test_class
Expand Down

0 comments on commit 18e39e9

Please sign in to comment.