faker-ruby / faker

A library for generating fake data such as names, addresses, and phone numbers.
MIT License
11.26k stars 3.18k forks source link

(Undesired?) leading whitespace in `music.band` #3011

Closed JeremasPosta closed 1 week ago

JeremasPosta commented 1 week ago

Describe the bug

Hi all.

Just came upon a flaky test on our app because of this music.band starting with an empty space. Not your fault at all, but happy to open a PR for updating it if you are good with that.

https://github.com/faker-ruby/faker/blob/6ba06393f47d4018b5fdbdaaa04eb9891ae5fb55/lib/locales/en/music.yml#L62 I did git-blame this file and I don't think this was purposely added so long ago.

To Reproduce

Just use Faker::Music.band

1000.times{band = Faker::Music.band; puts band if band.starts_with?(' ')}
 The
 The
 The
 The
 The
=> 1000

Expected behavior

I would not expect to have just ONE example breaking the convention.

Additional context

Proposed fix:

thdaraujo commented 1 week ago

oh that's funny. Yeah, feel free to send a PR and I'll take a look.