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

Fix unused variable warnings in unit tests #2552

Merged
merged 1 commit into from Apr 12, 2024

Conversation

kaylareopelle
Copy link
Contributor

@kaylareopelle kaylareopelle commented Apr 11, 2024

When I was running some tests locally for #2546, I noticed we had a few "unused variable" warnings. This PR fixes those warnings.

Closes #2554

Comment on lines +279 to 281
attribute_set_attempted = false
tl_current_mock = Minitest::Mock.new
tl_current_mock.expect :add_custom_attributes, -> { attribute_set_attempted = true }, [attrs]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The warning for this one said attribute_set_attempted was assigned, but never used, with the mock.expect line as the culprit. Defining the argument before the proc removed the warning.

@kaylareopelle kaylareopelle marked this pull request as ready for review April 11, 2024 20:09
@kaylareopelle kaylareopelle merged commit 47b4f48 into dev Apr 12, 2024
30 of 31 checks passed
@kaylareopelle kaylareopelle deleted the fix-unused-variable-warnings branch April 12, 2024 19:07
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

Successfully merging this pull request may close these issues.

Fix unused variable warnings in unit tests
2 participants