我在windows7上运行。
我可以用&没有spork。
没有spork,它已经死了。 使用Spork,测试会运行两次,有什么想法可以吗?
如果我开始spork:
bundle exec spork cucumber
&安培;然后使用黄瓜运行测试,测试首先快速运行,我得到以下输出
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
然后测试再次重新运行,但慢慢好像spork没有运行。
rails --version
rails --version
DL is deprecated, please use Fiddle
Rails 4.1.1
捆绑秀
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文件:
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
网上唯一可以找到下面信息的参考资料告诉我,我可以忽略这一点。我曾尝试过使用黄瓜和宝石的宝石版本。但是我总是得到堆栈痕迹。
Spork is no longer supported as of Cucumber 1.3.0. Please downgrade to version 1.2.5 Disabling profiles...
答案 0 :(得分:0)
回答我自己的问题。
我知道这不是正确的答案,但在没有任何其他情况下,这是有效的
在文件C:\ RailsInstaller \ Ruby2.0.0 \ lib \ ruby \ gems \ 2.0.0 \ gems \ cucumber-1.3.15 \ lib \ cucumber \ cli \ drb_client.rb中我注意到了异常的提升第24行如下:
rescue DRb::DRbConnError
STDERR.puts DRbClientError
#commented by BillComer
#raise DRbClientError, "No DRb server is running."
这样做的缺点是你必须运行Spork,因为对此进行注释实际上会禁用引用它来运行非spork变体的代码。