Remove `FactoryGirl.define`
This removes an invocation of `FactoryGirl.define` in the traits section of GETTING_STARTED, to make the example code consistent with the rest of its context (which does not use `define`).
This commit is contained in:
parent
972c71d1e4
commit
07ece7c416
|
@ -751,16 +751,14 @@ create(:post).author
|
|||
Traits can be used within other traits to mix in their attributes.
|
||||
|
||||
```ruby
|
||||
FactoryGirl.define do
|
||||
factory :order do
|
||||
trait :completed do
|
||||
completed_at { 3.days.ago }
|
||||
end
|
||||
factory :order do
|
||||
trait :completed do
|
||||
completed_at { 3.days.ago }
|
||||
end
|
||||
|
||||
trait :refunded do
|
||||
completed
|
||||
refunded_at { 1.day.ago }
|
||||
end
|
||||
trait :refunded do
|
||||
completed
|
||||
refunded_at { 1.day.ago }
|
||||
end
|
||||
end
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue