我有一个简单的规范
describe "Workers" do
describe "user attempts to view workers" do
context "admin logged in" do
end
context "non-logged in user" do
before do
visit workers_path
end
it "should redirect to home page" do
page.should have_content 'You are not authorized to access this page.'
end
end
end
end
这传递得很好。如果我添加save_and_open_page
,测试运行将终止并且输出显示“Process finished with exit code 0”,但没有说明测试状态。
describe "Workers" do
describe "user attempts to view workers" do
context "admin logged in" do
end
context "non-logged in user" do
before do
visit workers_path
end
it "should redirect to home page" do
save_and_open_page
page.should have_content 'You are not authorized to access this page.'
end
end
end
end
Capybara:2.1.0
launchy:2.3.0
rspec:2.13.0
rails:3.2.13
答案 0 :(得分:0)
一定是安装不好的。我降级到推出2.2.0并且一切正常,然后我升级(返回)到发布2.3.0并且事情似乎工作正常。