上賞花運行1.0.0因爲某種原因破壞數據我有一個控制器: module Web::Controllers::Quiz
class Test
include Web::Action
params QuizValidation
def show(thing)
thing
end
def call(params)
i
我想測試它的存在爲真,但也允許零值的模型屬性。我如何測試這個?我波紋管作出了表率: # Person model
belongs_to :city
validates :city_id, presence: true, :allow_nil => true
我試圖來測試: test "should permit nil for city_id" do
@person.city_