我很确定这些测试是正确的。通过在user.rb中删除has_many:relationships和has_many:reverse_relationships上的dependent:destroy选项,使它们失败。 希望分享一下我所做的工作,以防其他人正在通过Michael Hartl's ...