Skip to content

Commit

Permalink
Use dynamic attributes instead of static attributes with factory_bot
Browse files Browse the repository at this point in the history
Static attributes will be removed in FactoryBot 5.0
  • Loading branch information
gussan committed Oct 1, 2018
1 parent 3bd414b commit e0c60a2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/factories/users.rb
Expand Up @@ -9,7 +9,7 @@

trait :with_user_items do
transient do
user_items_count 10
user_items_count { 10 }
end

after(:build) do |user, evaluator|
Expand All @@ -30,8 +30,8 @@
end

trait :created_yesterday do
created_at 1.day.ago
updated_at 1.day.ago
created_at { 1.day.ago }
updated_at { 1.day.ago }
end
end

Expand Down

0 comments on commit e0c60a2

Please sign in to comment.