-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Add Faker::Auto features to Faker::Vehicle #1260
Conversation
# Conflicts: # lib/faker.rb # lib/faker/phone_number.rb # lib/locales/en-CA.yml # lib/locales/en.yml
… hash. Fixed by creating a key that contains a random make.
test/test_faker_vehicle.rb
Outdated
def test_year | ||
year = @tester.year | ||
assert year >= 1981 | ||
assert year <= ::Time.now.year |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1981
works but I think we should use 2005
instead. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that sounds much better. Considering the range for the year
method starts with 2005
😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
* add automotive data * allow for area and subscriber codes in canadian phone numbers * numberize phone number parts * improve auto data to always have correct makes and models pairs * fix Faker::Auto specs * fix Faker::Auto.model when called without make * use rand_in_range method * Added locales file for Auto data. * Fixed issues in the Auto.model due to fetch not being able to fetch a hash. Fixed by creating a key that contains a random make. * Moved Faker::Auto features into Faker::Vehicle. * Updated documentation for Faker::Vehicle. * Added missing tests. * Fixed Rubocop offences. * Updated the assertion so it matches the minimum range that the year method uses.
This is in reference to PR #692.
Some tests were missing from the original work, so I have added those in 👍