我遵循ROR教程,我使用rspec spec / requests / static_pages_spec.rb进行测试,发生错误" No DRb server is running. Running in local process instead
"'我做了一些研究,他们说是因为Spork服务器没有运行,所以我将Spork.each_run do
添加到spc文件,它没有帮助,我还修改了{{1的gem文件{}} gem 'guard-spork'
还是一样,任何人都可以提供帮助吗?提前致谢!
规格文件:
gem 'guard-spork', :github => 'guard/guard-spork'
Gemfile:
require 'spec_helper'
Spork.each_run do
end
describe "Static pages" do
let(:base_title) { "Ruby on Rails Tutorial Sample App" }
describe "Home page" do
it "should have the content 'Sample App'" do
visit '/static_pages/home'
expect(page).to have_content('Sample App')
end
it "should have the base title" do
visit '/static_pages/home'
expect(page).to have_title("Ruby on Rails Tutorial Sample App")
end
it "should not have a custom page title" do
visit '/static_pages/home'
expect(page).not_to have_title('| Home')
end
describe "Contact page" do
it "should have the content 'Contact'" do
visit '/static_pages/contact'
expect(page).to have_content('Contact')
end
it "should have the title 'Contact'" do
visit '/static_pages/contact'
expect(page).to have_title("Ruby on Rails Tutorial Sample App | Contact")
end
end
end
end