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

Unused variables in unit tests #2247

Closed
kaylareopelle opened this issue Oct 9, 2023 · 4 comments · Fixed by #2250
Closed

Unused variables in unit tests #2247

kaylareopelle opened this issue Oct 9, 2023 · 4 comments · Fixed by #2250

Comments

@kaylareopelle
Copy link
Contributor

Running our full suite of Minitest tests reports that the following variables are declared but never used. Each test should be verified to see if the variable can be removed entirely or if the test should be refactored to include the use of the variable.

test/new_relic/agent/configuration/manager_test.rb:497: warning: assigned but unused variable - dd
test/new_relic/agent/configuration/manager_test.rb:515: warning: assigned but unused variable - dd
test/new_relic/agent/tracer_test.rb:311: warning: assigned but unused variable - segment
test/new_relic/dependency_detection_test.rb:214: warning: assigned but unused variable - executed
test/new_relic/dependency_detection_test.rb:231: warning: assigned but unused variable - executed
test/new_relic/dependency_detection_test.rb:248: warning: assigned but unused variable - executed

These warnings can be reproduced by running: bundle exec rake test

@workato-integration
Copy link

@chahmedejaz
Copy link
Contributor

Hey @kaylareopelle - I'd love to work on this issue, can you please assign it to me? Thanks. :)

@chahmedejaz
Copy link
Contributor

chahmedejaz commented Oct 10, 2023

Sorry, I mistakenly linked this issue with the wrong PR 😅

@kaylareopelle
Copy link
Contributor Author

@chahmedejaz - No worries! You've been assigned to this issue. Thank you for your help. Let us know if you have any questions! 😄

chahmedejaz added a commit to chahmedejaz/newrelic-ruby-agent that referenced this issue Oct 10, 2023
kaylareopelle added a commit that referenced this issue Oct 10, 2023
…ed-var-warnings

#2247, removes unused variable warnings in tests suite
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants