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.
我正在阅读michael hartl 教程;使用具有“跟随”方法的模型用户;其中一个测试有一个像“should_not be_following”这样的断言,所以我假设这里内部使用了屈折来找到跟随方法?
不,它使用 RSpec 自己的谓词方法规则:
thing.should_not be_following
只是简写
thing.following?.should_not be(true)