{"comment":{"url":"https://api.github.com/repos/Association-Merci-Edgar/Merci-Edgar/comments/13055554","html_url":"https://github.com/Association-Merci-Edgar/Merci-Edgar/commit/492d56263de81c2523db05b64a9fbc66cf985339#commitcomment-13055554","id":13055554,"user":{"login":"yaf","id":42057,"avatar_url":"https://avatars.githubusercontent.com/u/42057?v=3","gravatar_id":"","url":"https://api.github.com/users/yaf","html_url":"https://github.com/yaf","followers_url":"https://api.github.com/users/yaf/followers","following_url":"https://api.github.com/users/yaf/following{/other_user}","gists_url":"https://api.github.com/users/yaf/gists{/gist_id}","starred_url":"https://api.github.com/users/yaf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yaf/subscriptions","organizations_url":"https://api.github.com/users/yaf/orgs","repos_url":"https://api.github.com/users/yaf/repos","events_url":"https://api.github.com/users/yaf/events{/privacy}","received_events_url":"https://api.github.com/users/yaf/received_events","type":"User","site_admin":false},"position":30,"line":29,"path":"spec/factories/users.rb","commit_id":"492d56263de81c2523db05b64a9fbc66cf985339","created_at":"2015-09-03T19:20:28Z","updated_at":"2015-09-03T19:20:28Z","body":"Peut-être que l'usage d'un `trait` aurait suffit ? genre:\r\n\r\n```ruby\r\n  FactoryGirl.define do\r\n    factory :user do\r\n      trait :with_trial_period_account_expired do\r\n        association :account, factory: :account, name: created_at: Date.current - 1.month - 1.day\r\n      end\r\n  end\r\nend\r\n```\r\n\r\nEt peut-être même que ces cas de figure repressente un ou deux cas de test particulier, dans lequel tu pourrais gérer la date plutôt que de mettre un `Date.current` dans la factory..."}}