上赏花运行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_