Ruby on rails 启动gem终止测试
我有一个简单的规范Ruby on rails 启动gem终止测试,ruby-on-rails,rspec,tdd,capybara,Ruby On Rails,Rspec,Tdd,Capybara,我有一个简单的规范 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"
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_和
,测试运行将终止,输出显示“进程已完成,退出代码为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
水豚:2.1.0
发射:2.3.0
rspec:2.13.0
rails:3.2.13一定是launchy的错误安装。我降级到launchy 2.2.0,一切正常,然后我升级(返回)到launchy 2.3.0,一切似乎正常。在您的描述中,您提到了“保存和加载页面”,但在代码中有“保存和打开页面”。“保存和打开页面”是正确的。@rebizele-肯定是打字错误。解决这个问题。谢谢