Skip to content

Don't use relative path from spec/ to lib/ #7

Description

@utkarsh2102

Hello,

Thanks for your work on in-parallel. However, I see that whilst running the tests, a require call is being made relative to the directory from spec/ to lib/:

require_relative('../lib/in_parallel')

To know more why, refer this: https://docs.rubocop.org/rubocop-packaging/cops_packaging.html#require-relative-hardcoding-lib-rationale

Here's the patch to fix this:

Description: Fix autopkgtest.
Author: Utkarsh Gupta <utkarsh@debian.org>
Bug-Debian: https://bugs.debian.org/979700

--- a/spec/in-paralell_spec.rb
+++ b/spec/in-paralell_spec.rb
@@ -1,5 +1,6 @@
 require 'rspec'
-require_relative('../lib/in_parallel')
+require 'in_parallel'
+
 include InParallel
 TMP_FILE = Dir.mktmpdir + 'test_file.txt'
 

Should you need help, let me know!

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions