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 flaky specs for name and id #2782

Merged
merged 1 commit into from
Jun 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/faker/default/test_faker_id_number.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def test_brazilian_citizen_number_formatted
def test_brazilian_id
sample = @tester.brazilian_id

assert_match(/^\d{9}$/, sample)
assert_match(/^\d{8}(X|\d)?$/, sample)
assert_match(/(\d)((?!\1)\d)+/, sample)
end

Expand Down
2 changes: 1 addition & 1 deletion test/faker/default/test_faker_name.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def test_name_with_middle
end

def test_first_name
assert_match(/(\w+\.? ?){3,4}/, @tester.first_name)
assert_match(/(\w+\.? ?){2,4}/, @tester.first_name)
end

def test_male_first_name
Expand Down