我下载了rspec和bundler。我遵循非常明确的指示,但我一直收到这些错误消息。它说它应该运行。
我有2.99版的rspec核心,但也有3.2版.我已经将2.99版本放到了这个rspec文件中,但是它似乎没有帮助。
Qureshis-MacBook-Pro:test-first-ruby-master Qureshi$ bundle exec rspec spec/00_hello_spec.rb
/Users/Qureshi/Desktop/test-first-ruby-master/spec/spec_helper.rb:31:in `block (2 levels) in <top (required)>': undefined method `include_chain_clauses_in_custom_matcher_descriptions=' for #<RSpec::Expectations::Configuration:0x007fcf3289f4c8> (NoMethodError)
from /Library/Ruby/Gems/2.0.0/gems/rspec-core-2.99.1/lib/rspec/core/configuration.rb:580:in `expect_with'
from /Users/Qureshi/Desktop/test-first-ruby-master/spec/spec_helper.rb:23:in `block in <top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/rspec-core-2.99.1/lib/rspec/core.rb:154:in `configure'
from /Users/Qureshi/Desktop/test-first-ruby-master/spec/spec_helper.rb:19:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/rspec-core-2.99.1/lib/rspec/core/configuration.rb:1036:in `require'
from /Library/Ruby/Gems/2.0.0/gems/rspec-core-2.99.1/lib/rspec/core/configuration.rb:1036:in `block in setup_load_path_and_require'
from /Library/Ruby/Gems/2.0.0/gems/rspec-core-2.99.1/lib/rspec/core/configuration.rb:1036:in `each'
from /Library/Ruby/Gems/2.0.0/gems/rspec-core-2.99.1/lib/rspec/core/configuration.rb:1036:in `setup_load_path_and_require'
from /Library/Ruby/Gems/2.0.0/gems/rspec-core-2.99.1/lib/rspec/core/configuration_options.rb:25:in `configure'
from /Library/Ruby/Gems/2.0.0/gems/rspec-core-2.99.1/lib/rspec/core/command_line.rb:17:in `run'
from /Library/Ruby/Gems/2.0.0/gems/rspec-core-2.99.1/lib/rspec/core/runner.rb:103:in `run'
from /Library/Ruby/Gems/2.0.0/gems/rspec-core-2.99.1/lib/rspec/core/runner.rb:17:in `block in autorun'
Qureshis-MacBook-Pro:test-first-ruby-master Qureshi$ bundle exec rspec spec
/Users/Qureshi/Desktop/test-first-ruby-master/spec/spec_helper.rb:31:in `block (2 levels) in <top (required)>': undefined method `include_chain_clauses_in_custom_matcher_descriptions=' for #<RSpec::Expectations::Configuration:0x007ff5c190f560> (NoMethodError)
from /Library/Ruby/Gems/2.0.0/gems/rspec-core-2.99.1/lib/rspec/core/configuration.rb:580:in `expect_with'
from /Users/Qureshi/Desktop/test-first-ruby-master/spec/spec_helper.rb:23:in `block in <top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/rspec-core-2.99.1/lib/rspec/core.rb:154:in `configure'
from /Users/Qureshi/Desktop/test-first-ruby-master/spec/spec_helper.rb:19:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/rspec-core-2.99.1/lib/rspec/core/configuration.rb:1036:in `require'
from /Library/Ruby/Gems/2.0.0/gems/rspec-core-2.99.1/lib/rspec/core/configuration.rb:1036:in `block in setup_load_path_and_require'
from /Library/Ruby/Gems/2.0.0/gems/rspec-core-2.99.1/lib/rspec/core/configuration.rb:1036:in `each'
from /Library/Ruby/Gems/2.0.0/gems/rspec-core-2.99.1/lib/rspec/core/configuration.rb:1036:in `setup_load_path_and_require'
from /Library/Ruby/Gems/2.0.0/gems/rspec-core-2.99.1/lib/rspec/core/configuration_options.rb:25:in `configure'
from /Library/Ruby/Gems/2.0.0/gems/rspec-core-2.99.1/lib/rspec/core/command_line.rb:17:in `run'
from /Library/Ruby/Gems/2.0.0/gems/rspec-core-2.99.1/lib/rspec/core/runner.rb:103:in `run'
from /Library/Ruby/Gems/2.0.0/gems/rspec-core-2.99.1/lib/rspec/core/runner.rb:17:in `block in autorun'发布于 2015-02-22 23:28:52
您试图在spec_helper.rb文件(include_chain_clauses_in_custom_matcher_descriptions)中设置的配置选项是在每个https://github.com/rspec/rspec-expectations/blob/v3.1.0/Changelog.md的RSpec 3.1中引入的,但您正在运行RSpec 2.99。
https://stackoverflow.com/questions/28663952
复制相似问题