1

spork 启动输出:

spork # =>

Using RSpec, Rails
  -- Starting to fill pool...
     Wait until at least one slave is provided before running tests...
  ** CTRL+BREAK to stop Spork and kill all ruby slave processes **
Spork is ready and listening on 8989!
Preloading Rails environment
Preloading Rails environment
Loading Spork.prefork block...
Loading Spork.prefork block...
# ... some app output info...

似乎正在运行(我可以通过浏览器访问它,有一些响应)但每次我尝试运行规范时:

rspec --drb -c ./spec/path/to_file # =>

No DRb server is running. Running in local process instead ...

为什么 ?

预先感谢。


环境:

  • Ubuntu 12.10
  • jruby-1.6.8@ruby-1.9.2;
  • rspec 2.13;

spec_helper.rb:

require 'rubygems'
require 'spork'

Spork.prefork do
  ENV["RAILS_ENV"] ||= 'test'
  require File.expand_path("../../config/environment", __FILE__)
  require 'rspec/rails'
  require 'rspec/autorun'
  require 'capybara/rails' #an alternative to webrat

  Dir[Rails.root.join("spec/helpers/*.rb")].each {|f| require f}

  RSpec.configure do |config|
    config.mock_with :rspec
    config.use_transactional_fixtures = true
  end
end

Spork.each_run do
  FactoryGirl.reload
end
4

0 回答 0