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 two rogue messages on tests #1918

Merged
merged 1 commit into from
Sep 30, 2023

Conversation

gnclmorais
Copy link
Contributor

These two messages would appear on some tests, on the console. With this commit those messages are still caught but don’t show up on the console anymore (in the middle of RSpec’s dots).

The messages were:

  • You have to provide an email address. Usage: rake member:delete'[[email protected]]'
  • Checking for expected text of nil is confusing and/or pointless since it will always match. Please specify a string or regexp instead.

Technically, the second one is not a message we display on the code, but rather an RSpec warning telling us one of our variables was nil. Adding content to the constructor was the solution.

These two messages would appear on some tests, on the console. With
this commit those messages are still caught but don’t show up on the
console anymore (in the middle of RSpec’s dots).

The messages were:
- You have to provide an email address. Usage: rake member:delete'[[email protected]]'
- Checking for expected text of nil is confusing and/or pointless since it will always
  match. Please specify a string or regexp instead.

Technically, the second one is not a message we display on the code,
but rather an RSpec warning telling us one of our variables was nil.
Adding content to the constructor was the solution.
Copy link
Contributor

@matyikriszta matyikriszta left a comment

Choose a reason for hiding this comment

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

Thanks @gnclmorais

@matyikriszta matyikriszta merged commit 4f80b70 into codebar:master Sep 30, 2023
1 check passed
@gnclmorais gnclmorais deleted the improve-two-test-messages branch October 2, 2023 07:59
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.

2 participants