鉴于以下规格:
describe Person
describe "scopes and class methods" do
let!(:sixty_older) { FactoryGirl.create :person, birthdate: 60.years.ago }
describe ".senior" do
subject { Person.senior }
it { should include(sixty_older) }
end
end
end
它在 CLI 中使用格式 --documentation 的输出:
Person
scopes and class methods
.senior
should include #<Person person_id: 466, gender: "M", birthdate: "1953-02-07 19:44:22", birthdate_estimated: 0, dead: 0, death_date: nil, cause_of_death: nil, creator: 0, date_created: "0002-11-30 00:00:00", changed_by: nil, date_changed: nil, voided: 0, voided_by: nil, date_voided: nil, void_reason: nil, uuid: "key_4">
我可以将其更改#<Person person_id: ....>
为其他内容吗?
比如说,只显示 person_id、birthdate 和 uuid?
此外,如果它可以在每个测试的基础上进行定制,而不是在类级别的变化上。