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

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

Open
utkarsh2102 opened this issue Jan 18, 2021 · 0 comments
Open

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

utkarsh2102 opened this issue Jan 18, 2021 · 0 comments

Comments

@utkarsh2102
Copy link

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!

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