1
0
Fork 0
mirror of https://github.com/thoughtbot/factory_bot.git synced 2022-11-09 11:43:51 -05:00

Judy->draft

This commit is contained in:
Sean Doyle 2019-04-05 14:23:57 -04:00
parent f30cb1b129
commit 6559dd2631

View file

@ -55,14 +55,14 @@ describe "an instance generated by a factory with multiple traits" do
factory :morning, traits: [:morning] do
trait :draft do
draft { true }
name { "Judy" }
name { "draft" }
end
factory :morning_great_post do
great
end
factory :morning_draft_judy, traits: [:draft]
factory :morning_draft_child, traits: [:draft]
end
factory :morning_draft, traits: [:morning, :draft]
@ -132,8 +132,8 @@ describe "an instance generated by a factory with multiple traits" do
end
context "child class with scoped trait and inherited trait" do
subject { FactoryBot.create(:morning_draft_judy) }
its(:name) { should eq "Judy" }
subject { FactoryBot.create(:morning_draft_child) }
its(:name) { should eq "draft" }
its(:slug) { should eq "morning" }
it { should be_draft }
end