0
我正在閱讀michael hartl tutorial;與具有「跟隨」方法的模型用戶相關聯;其中一個測試有一個斷言,如「should_not be_following」 ,所以我假設拐點在這裏用於內部找到以下方法?rspec當使用rails使用變形?
我正在閱讀michael hartl tutorial;與具有「跟隨」方法的模型用戶相關聯;其中一個測試有一個斷言,如「should_not be_following」 ,所以我假設拐點在這裏用於內部找到以下方法?rspec當使用rails使用變形?
不,it's using RSpec's own rule around predicate methods:
thing.should_not be_following
只是爲
thing.following?.should_not be(true)
只是看到在用戶模型中有一個「以下」的方法...感謝這個答案雖然..不會傷害知道.. –
當然這不是簡寫'should_not be_following'? –
是剛剛糾正..感謝 –