Здравствуйте!
Для ускорения процесса тестирования установил гем spork (вер. 0.9.2).
Запускаю сервер spork. Выдает такие результаты:
c:\RailsProject\thinkblog>spork rspec
Using RSpec
-- Rinda Ring Server listening for connections...
-- 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!
-- build slave 2... -- build slave 1...
Preloading Rails environment
Preloading Rails environment
DL is deprecated, please use Fiddle
For a better pry experience, please use ansicon: adoxa.3eeweb.com/ansicon
/
DL is deprecated, please use Fiddle
For a better pry experience, please use ansicon: adoxa.3eeweb.com/ansicon
/
C:/Ruby200/lib/ruby/gems/2.0.0/gems/spork-0.9.2/lib/spork/app_framework/rails.rb
:56:in `preload_rails': uninitialized constant ActiveModel::Observing (NameError
)
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/spork-0.9.2/lib/spork/app_frame
work/rails.rb:7:in `preload'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/spork-0.9.2/lib/spork/test_fram
ework.rb:134:in `block in preload'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/spork-0.9.2/lib/spork.rb:62:in
`exec_prefork'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/spork-0.9.2/lib/spork/test_fram
ework.rb:120:in `preload'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/spork-0.9.2/lib/spork/run_strat
egy/magazine/magazine_slave.rb:27:in `preload'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/spork-0.9.2/lib/spork/run_strat
egy/magazine/magazine_slave.rb:15:in `initialize'
from magazine_slave_provider.rb:21:in `new'
from magazine_slave_provider.rb:21:in `'
C:/Ruby200/lib/ruby/gems/2.0.0/gems/spork-0.9.2/lib/spork/app_framework/rails.rb
:56:in `preload_rails': uninitialized constant ActiveModel::Observing (NameError
)
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/spork-0.9.2/lib/spork/app_frame
work/rails.rb:7:in `preload'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/spork-0.9.2/lib/spork/test_fram
ework.rb:134:in `block in preload'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/spork-0.9.2/lib/spork.rb:62:in
`exec_prefork'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/spork-0.9.2/lib/spork/test_fram
ework.rb:120:in `preload'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/spork-0.9.2/lib/spork/run_strat
egy/magazine/magazine_slave.rb:27:in `preload'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/spork-0.9.2/lib/spork/run_strat
egy/magazine/magazine_slave.rb:15:in `initialize'
from magazine_slave_provider.rb:21:in `new'
from magazine_slave_provider.rb:21:in `'
Запускаю тест с флагом --drb:
bundle exec rspec spec/features/static_pages_spec.rb -
-drb
Но тестирование не выполняется, ошибок тоже не выдает.
Возможно что-то намудрил с файлом spec_helper.rb. Вот его содержимое:
require 'rubygems'
require 'spork'
#uncomment the following line to use spork with the debugger
#require 'spork/ext/ruby-debug'
Spork.prefork do
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
require 'rspec/autorun'
Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
ActiveRecord::Migration.check_pending! if defined?(ActiveRecord::Migration)
RSpec.configure do |config|
config.infer_base_class_for_anonymous_controllers = false
config.order = "random"
end
end
Spork.each_run do
# This code will be run each time you run your specs.
#Подгружаем каждый раз все файлы из директории app/
Dir["#{Rails.root}/app/**/*.rb"].each {|file| load file }
#Подгружаем файл с описанием маршрутизации
load "#{Rails.root}/config/routes.rb"
end
Что делаю не так?
Rails 4.0.1, win7.