【发布时间】:2014-07-26 11:55:22
【问题描述】:
我正在使用以下代码在 padrino 上使用 rspec 测试我的控制器:
https://gist.github.com/anonymous/8d0df4c189e99c7cb7ea
如果我运行测试一切正常,所有测试都将变为绿色。 问题是那些测试必须失败! before 块上的 sign_in_admin 不允许用户登录并进行 post 调用,如果我更改行
last_response.should_not be_ok
与
last_response.should be_ok
测试总是绿色..... 我不知道我错在哪里。
这是我的 spec_helper.rb
【问题讨论】:
标签: ruby rspec sinatra padrino