0
그래서 fabricator와 두 개의 하위 클래스가있는 상위 클래스가 있습니다. 공유 코드 설정을 위해 상위 클래스의 제작자를 참조하도록 하위 클래스를 얻으려면 어떻게해야합니까?서브 클래 싱 된 fabricator는 어떻게 건조합니까?
E. G.는
Fabricator(:parent) do
important_variable "Foo"
lesser_variable "Bar
end
Fabricator(:child1) do
//Not sure I actually need anything in here
end
Fabricator(:child2) do
//Again, not sure I actually need anything in here
end
Fabricate(:child).important_variable #Foo
Fabricate(:child).lesser_variable #Bar
매우 유쾌하게, 나는 문서를 읽었다. 어떻게 든 이것을 놓쳤습니다. – RonLugge
doc 사이트도 오픈 소스이므로 PR을 향상시킬 수 있다고 생각한다면 https://github.com/paulelliott/fabrication-site –
아니, 바로 앞에있는 것이 보이지 않는 것입니다. 나 - '하위 클래스'대신 '상속'을 검색 했어야합니다. 내 머리가 포기하지 않아도 올바른 단어였습니다. – RonLugge