{"action":"created","issue":{"url":"https://api.github.com/repos/stympy/faker/issues/298","labels_url":"https://api.github.com/repos/stympy/faker/issues/298/labels{/name}","comments_url":"https://api.github.com/repos/stympy/faker/issues/298/comments","events_url":"https://api.github.com/repos/stympy/faker/issues/298/events","html_url":"https://github.com/stympy/faker/issues/298","id":53215682,"number":298,"title":"Faker set the locale to rspec","user":{"login":"asiniy","id":1296472,"avatar_url":"https://avatars.githubusercontent.com/u/1296472?v=3","gravatar_id":"","url":"https://api.github.com/users/asiniy","html_url":"https://github.com/asiniy","followers_url":"https://api.github.com/users/asiniy/followers","following_url":"https://api.github.com/users/asiniy/following{/other_user}","gists_url":"https://api.github.com/users/asiniy/gists{/gist_id}","starred_url":"https://api.github.com/users/asiniy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asiniy/subscriptions","organizations_url":"https://api.github.com/users/asiniy/orgs","repos_url":"https://api.github.com/users/asiniy/repos","events_url":"https://api.github.com/users/asiniy/events{/privacy}","received_events_url":"https://api.github.com/users/asiniy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-01-01T08:30:24Z","updated_at":"2015-05-22T07:52:54Z","closed_at":null,"body":"You have said me about I need to set my locale at the code and it'll generate good code afterwise.\r\n\r\nSo, there is a trouble.\r\n\r\nI use Faker with rspec-rails gem. I `require 'faker'` at `spec_helper.rb` and write something like that:\r\n\r\n```\r\nRSpec.configure do |config|\r\n  Faker::Config.locale = 'ru'\r\n```\r\n\r\nI generate first names and last names afterwards. They are still in english...\r\nHow can I solve this problem?"},"comment":{"url":"https://api.github.com/repos/stympy/faker/issues/comments/104555683","html_url":"https://github.com/stympy/faker/issues/298#issuecomment-104555683","issue_url":"https://api.github.com/repos/stympy/faker/issues/298","id":104555683,"user":{"login":"NikitaAvvakumov","id":5029403,"avatar_url":"https://avatars.githubusercontent.com/u/5029403?v=3","gravatar_id":"","url":"https://api.github.com/users/NikitaAvvakumov","html_url":"https://github.com/NikitaAvvakumov","followers_url":"https://api.github.com/users/NikitaAvvakumov/followers","following_url":"https://api.github.com/users/NikitaAvvakumov/following{/other_user}","gists_url":"https://api.github.com/users/NikitaAvvakumov/gists{/gist_id}","starred_url":"https://api.github.com/users/NikitaAvvakumov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NikitaAvvakumov/subscriptions","organizations_url":"https://api.github.com/users/NikitaAvvakumov/orgs","repos_url":"https://api.github.com/users/NikitaAvvakumov/repos","events_url":"https://api.github.com/users/NikitaAvvakumov/events{/privacy}","received_events_url":"https://api.github.com/users/NikitaAvvakumov/received_events","type":"User","site_admin":false},"created_at":"2015-05-22T07:52:54Z","updated_at":"2015-05-22T07:52:54Z","body":"It's not a bug per se: The Russian locale ('lib/locales/ru.yml') does not define `first_name` & `last_name`. Instead, it has `(fe)male_first_name`, '(fe)male_middle_name` & `(fe)male_last_name`. When you call `name`, the full name gets randomly composed following one of the predefined gender-specific patterns: https://github.com/stympy/faker/blob/master/lib/locales/ru.yml#L34.\r\n\r\nHowever, since gender-neutral `first_name` is not provided, Faker falls back to the default locale, which is `en`. Whether this is the preferred solution to raising an exception is debatable. We've recently forked Faker as [FactoryHelper](https://github.com/factory-helper/factory-helper), and this silent fallback to `en` is one of the issues that we will consider addressing."}}