Cucumber tests running twice with spork on windows

441 Views Asked by At

I am running on windows7.

I can run cucumber with & without spork.

Without spork it is dead slow. With Spork the tests run twice, Any ideas why please ?

If I start up spork:

bundle exec spork cucumber

& then run the tests using cucumber the tests first run dead quick, I get the following output

Spork is no longer supported as of Cucumber 1.3.0. Please downgrade to version 1.2.5 Disabling profiles...

.....test o/p

10 scenarios (10 passed) 69 steps (69 passed) 0m1.010s WARNING: No DRb server is running. Running features locally: WARN: Unresolved specs during Gem::Specification.reset:
      builder (>= 2.1.2, ~> 3.1)
      mime-types (>= 1.16, ~> 1.16)
      treetop (~> 1.4.8)
      rake (>= 0.8.7)
      sprockets-rails (~> 2.0) WARN: Clearing out unresolved specs. Please report a bug if this causes problems. DL is deprecated, please use Fiddle Using the default profile... Feature: authentication pages

.....test o/p 

And then the tests rerun again but slowly as if spork is not running.

rails --version

rails --version
DL is deprecated, please use Fiddle
Rails 4.1.1

bundle show

C:\Sites\rails_projects\sample_app2>bundle show
Gems included by the bundle:
  * actionmailer (4.1.1)
  * actionpack (4.1.1)
  * actionview (4.1.1)
  * activemodel (4.1.1)
  * activerecord (4.1.1)
  * activesupport (4.1.1)
  * arel (5.0.1.20140414130214)
  * bcrypt (3.1.7)
  * bootstrap-sass (2.3.2.0)
  * builder (3.2.2)
  * bundler (1.3.5)
  * capybara (2.3.0)
  * celluloid (0.15.2)
  * childprocess (0.5.3)
  * coderay (1.1.0)
  * coffee-rails (4.0.1)
  * coffee-script (2.2.0)
  * coffee-script-source (1.7.0)
  * cucumber (1.3.15)
  * cucumber-rails (1.4.1)
  * database_cleaner (1.3.0)
  * diff-lcs (1.2.5)
  * erubis (2.7.0)
  * execjs (2.2.0)
  * factory_girl (4.2.0)
  * factory_girl_rails (4.2.1)
  * ffi (1.9.3)
  * formatador (0.2.5)
  * gherkin (2.12.2)
  * guard (2.6.1)
  * guard-spork (1.5.1)
  * haml (4.0.5)
  * hike (1.2.3)
  * i18n (0.6.9)
  * jbuilder (2.1.0)
  * jquery-rails (3.1.0)
  * json (1.8.1)
  * listen (2.7.7)
  * lumberjack (1.0.6)
  * mail (2.5.4)
  * method_source (0.8.2)
  * mime-types (1.25.1)
  * mini_portile (0.6.0)
  * minitest (5.3.4)
  * multi_json (1.10.1)
  * multi_test (0.1.1)
  * nokogiri (1.6.2.1)
  * pg (0.17.1)
  * polyglot (0.3.5)
  * pry (0.10.0)
  * rack (1.5.2)
  * rack-test (0.6.2)
  * rails (4.1.1)
  * rails_12factor (0.0.2)
  * rails_serve_static_assets (0.0.2)
  * rails_stdout_logging (0.0.3)
  * railties (4.1.1)
  * rake (10.3.2)
  * rb-fsevent (0.9.4)
  * rb-inotify (0.9.5)
  * rdoc (4.1.1)
  * rspec-collection_matchers (1.0.0)
  * rspec-core (2.99.0)
  * rspec-expectations (2.99.0)
  * rspec-its (1.0.1)
  * rspec-mocks (2.99.0)
  * rspec-rails (2.99.0)
  * sass (3.2.19)
  * sass-rails (4.0.3)
  * sdoc (0.4.0)
  * shoulda-matchers (2.6.1)
  * slop (3.5.0)
  * spork (1.0.0rc4)
  * spork-rails (4.0.0)
  * spring (1.1.3)
  * sprockets (2.11.0)
  * sprockets-rails (2.1.3)
  * sqlite3 (1.3.9)
  * therubyrhino (2.0.3)
  * therubyrhino_jar (1.7.4)
  * thor (0.19.1)
  * thread_safe (0.3.4)
  * tilt (1.4.1)
  * timers (1.1.0)
  * treetop (1.4.15)
  * turbolinks (2.2.2)
  * tzinfo (1.2.1)
  * tzinfo-data (1.2014.3)
  * uglifier (2.5.0)
  * win32-process (0.7.4)
  * win32console (1.3.2)
  * xpath (2.0.0)

gem file:

source 'https://rubygems.org'


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.1'

gem 'bootstrap-sass', '2.3.2.0'
gem 'sprockets', '2.11.0'
gem 'bcrypt', '~> 3.1.2'


# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer',  platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0',          group: :doc

# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring',        group: :development


gem 'execjs'
#gem 'therubyracer'
gem 'therubyrhino'
gem 'haml'
gem 'sass'

gem 'tzinfo-data'

group :development, :test do
  gem 'rspec-rails', '~> 2.0'  
  gem 'rspec-its'
  # Use sqlite3 as the database for Active Record
  gem 'sqlite3'

  gem 'spork-rails' #, '4.0.0'
  gem 'guard-spork' #, '1.5.0'
  gem 'childprocess' #, '0.3.6'
end

group :test do
  gem 'cucumber-rails',require: false
  gem 'database_cleaner'
  gem 'shoulda-matchers'
  gem 'factory_girl_rails', '~> 4.2.1'
  #gem 'factory_girl'
end


# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

# Use debugger
# gem 'debugger', group: [:development, :test]

group :production do
  gem 'pg'
  gem 'rails_12factor'
end

The only reference on the web to the message below that I can find tells me I can ignore this. I have tried mmessing about with gem versions of cucumber & cucumber-rails but I always get stacktraces.

Spork is no longer supported as of Cucumber 1.3.0. Please downgrade to version 1.2.5 Disabling profiles...
1

There are 1 best solutions below

0
Bill Comer On

To answer my own question.

I know this is not the correct answer but in the absence of anything else, this works

In file C:\RailsInstaller\Ruby2.0.0\lib\ruby\gems\2.0.0\gems\cucumber-1.3.15\lib\cucumber\cli\drb_client.rb I commented out the raising of the Exception on line 24 as in:

rescue DRb::DRbConnError
STDERR.puts DRbClientError
#commented by BillComer
  #raise DRbClientError, "No DRb server is running."

the disadvantage with this is that you have to be running Spork because commenting this out actually disables the code referring back to run the non spork variant.