0
當validate_presence_of
使用早該/ RSpec的我得到這些長期和重複的代碼塊多屬性測試喜歡你的:RSpec的/早該validate_presence_of多個屬性語法
it { should validate_presence_of(:text) }
it { should validate_presence_of(:user) }
it { should validate_presence_of(:commentable) }
[...]
有沒有辦法變幹這個嗎?這樣的事情:
it { should validate_presence_of(:text, :user, :commentable,...) }