Je ne sais pas s'il s'agit d'un problème Capybara, mais je viens de faire une nouvelle installation de Rails (4.1.1) et Rspec Rails (3.0.1) et I aimerait utiliser Capybara (2.3.0), mais ne l'ayant jamais utilisé, je rencontre des problèmes. J'ai créé une "spécification" dans spec/features et la spécification elle-même s'exécute et passe comme prévu, mais j'obtiens les "avertissements" suivants lorsque rspec est exécuté. Des idées? Dois-je simplement désactiver les avertissements au niveau Ruby ou quelque chose?)
/Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/mail-2.5.4/lib/mail/network/delivery_methods/sendmail.rb:53: warning: shadowing outer local variable - to
/Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247: warning: loading in progress, circular require considered harmful - /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/capybara-2.3.0/lib/capybara.rb
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/bin/Ruby_executable_hooks:15:in `<main>'
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/bin/Ruby_executable_hooks:15:in `eval'
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/bin/rspec:23:in `<main>'
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/bin/rspec:23:in `load'
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/rspec-core-3.0.0/exe/rspec:4:in `<top (required)>'
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/rspec-core-3.0.0/lib/rspec/core/runner.rb:38:in `invoke'
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/rspec-core-3.0.0/lib/rspec/core/runner.rb:70:in `run'
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/rspec-core-3.0.0/lib/rspec/core/runner.rb:85:in `run'
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/rspec-core-3.0.0/lib/rspec/core/runner.rb:97:in `setup'
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/rspec-core-3.0.0/lib/rspec/core/configuration.rb:1051:in `load_spec_files'
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/rspec-core-3.0.0/lib/rspec/core/configuration.rb:1051:in `each'
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/rspec-core-3.0.0/lib/rspec/core/configuration.rb:1051:in `block in load_spec_files'
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/rspec-core-3.0.0/lib/rspec/core/configuration.rb:1051:in `load'
from /Users/typeoneerror/Dev/Doki/engines/doki_core/spec/features/accounts/sign_up_spec.rb:1:in `<top (required)>'
from /Users/typeoneerror/Dev/Doki/engines/doki_core/spec/features/accounts/sign_up_spec.rb:1:in `require'
from /Users/typeoneerror/Dev/Doki/engines/doki_core/spec/Rails_helper.rb:7:in `<top (required)>'
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require'
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:232:in `load_dependency'
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `block in require'
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require'
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/rspec-Rails-3.0.1/lib/rspec/Rails.rb:9:in `<top (required)>'
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require'
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:232:in `load_dependency'
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `block in require'
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require'
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/rspec-Rails-3.0.1/lib/rspec/Rails/vendor/capybara.rb:2:in `<top (required)>'
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require'
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:232:in `load_dependency'
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `block in require'
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require'
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/capybara-2.3.0/lib/capybara/rspec.rb:1:in `<top (required)>'
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require'
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:232:in `load_dependency'
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `block in require'
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require'
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/capybara-2.3.0/lib/capybara.rb:5:in `<top (required)>'
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/capybara-2.3.0/lib/capybara.rb:320:in `<module:Capybara>'
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require'
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:232:in `load_dependency'
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `block in require'
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require'
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/capybara-2.3.0/lib/capybara/dsl.rb:1:in `<top (required)>'
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require'
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:232:in `load_dependency'
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `block in require'
from /Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require'
/Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/capybara-2.3.0/lib/capybara/node/matchers.rb:121: warning: assigned but unused variable - e
/Users/typeoneerror/.rvm/gems/Ruby-2.1.2@doki/gems/capybara-2.3.0/lib/capybara/Selenium/driver.rb:119: warning: assigned but unused variable - a
Retirer --warnings
de .rspec
. Le générateur de rspec 3.0.0 incluait ce paramètre, mais nous avons réalisé que c'était une erreur - s'il est bon d'encourager les utilisateurs à écrire du code sans avertissement, il est déroutant pour les utilisateurs d'obtenir ces avertissements sans savoir pourquoi.
Pour plus d'informations: