Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
模型模拟是否会自动访问 rspec 中模型的所有现有方法?我想不仅仅是为了确认。谢谢。
正如你所怀疑的,他们没有。这是使用模拟/存根和工厂作为测试对象的区别之一: