Formatting 使用expect语法时,Rspec 3.1 Core会在出错时输出整个对象
如果测试失败,例如:Formatting 使用expect语法时,Rspec 3.1 Core会在出错时输出整个对象,formatting,output,Formatting,Output,如果测试失败,例如: it "disallows unauthenticated access" do sign_out @user get :index expect(response).to_not be_success end 失败时,rspec输出整个对象(非常巨大的错误输出),而不仅仅是对象名 例如: disallows unauthenticated access Failure/Error: expect(respon
it "disallows unauthenticated access" do
sign_out @user
get :index
expect(response).to_not be_success
end
失败时,rspec输出整个对象(非常巨大的错误输出),而不仅仅是对象名
例如:
disallows unauthenticated access
Failure/Error: expect(response).to_not be_success
expected `#<ActionController::TestResponse:0x0000010d18b218
...
...
... (Goes on forever and ever and ever)
不允许未经验证的访问
失败/错误:预期(响应)。不成功
期望`#