테스트 환경에서 라크 작업을 실행할 때 문제가 발생했습니다
6461 단어 rspec-spies
묘사
ruby-1.9.2-p0$ RAILS_ENV=test bundle exec rake db:migrate:reset --trace
rake aborted!
undefined method `should' for module `RSpec::Matchers::BlockAliases'
/home/lucassus/Projects/example-project/vendor/gems/ruby/1.9.1/gems/rspec-expectations-2.6.0/lib/rspec/matchers/block_aliases.rb:4:in `alias_method'
/home/lucassus/Projects/example-project/vendor/gems/ruby/1.9.1/gems/rspec-expectations-2.6.0/lib/rspec/matchers/block_aliases.rb:4:in `<module:BlockAliases>'
/home/lucassus/Projects/example-project/vendor/gems/ruby/1.9.1/gems/rspec-expectations-2.6.0/lib/rspec/matchers/block_aliases.rb:3:in `<module:Matchers>'
/home/lucassus/Projects/example-project/vendor/gems/ruby/1.9.1/gems/rspec-expectations-2.6.0/lib/rspec/matchers/block_aliases.rb:2:in `<module:RSpec>'
/home/lucassus/Projects/example-project/vendor/gems/ruby/1.9.1/gems/rspec-expectations-2.6.0/lib/rspec/matchers/block_aliases.rb:1:in `<top (required)>'
/home/lucassus/Projects/example-project/vendor/gems/ruby/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
/home/lucassus/Projects/example-project/vendor/gems/ruby/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `block in require'
/home/lucassus/Projects/example-project/vendor/gems/ruby/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:225:in `block in load_dependency'
/home/lucassus/Projects/example-project/vendor/gems/ruby/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:596:in `new_constants_in'
/home/lucassus/Projects/example-project/vendor/gems/ruby/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:225:in `load_dependency'
/home/lucassus/Projects/example-project/vendor/gems/ruby/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
/home/lucassus/Projects/example-project/vendor/gems/ruby/1.9.1/gems/rspec-expectations-2.6.0/lib/rspec/matchers.rb:182:in `<top (required)>'
/home/lucassus/Projects/example-project/vendor/gems/ruby/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
/home/lucassus/Projects/example-project/vendor/gems/ruby/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `block in require'
/home/lucassus/Projects/example-project/vendor/gems/ruby/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:225:in `block in load_dependency'
/home/lucassus/Projects/example-project/vendor/gems/ruby/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:596:in `new_constants_in'
/home/lucassus/Projects/example-project/vendor/gems/ruby/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:225:in `load_dependency'
/home/lucassus/Projects/example-project/vendor/gems/ruby/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
/home/lucassus/Projects/example-project/vendor/gems/ruby/1.9.1/gems/rspec-spies-2.0.0/lib/rspec-spies.rb:18:in `<top (required)>'
/home/lucassus/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.15/lib/bundler/runtime.rb:68:in `require'
/home/lucassus/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.15/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
/home/lucassus/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.15/lib/bundler/runtime.rb:66:in `each'
/home/lucassus/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.15/lib/bundler/runtime.rb:66:in `block in require'
/home/lucassus/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.15/lib/bundler/runtime.rb:55:in `each'
/home/lucassus/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.15/lib/bundler/runtime.rb:55:in `require'
/home/lucassus/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.15/lib/bundler.rb:120:in `require'
/home/lucassus/Projects/example-project/config/application.rb:7:in `<top (required)>'
/home/lucassus/Projects/example-project/Rakefile:4:in `require'
/home/lucassus/Projects/example-project/Rakefile:4:in `<top (required)>'
/home/lucassus/Projects/example-project/vendor/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/rake_module.rb:25:in `load'
/home/lucassus/Projects/example-project/vendor/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/rake_module.rb:25:in `load_rakefile'
/home/lucassus/Projects/example-project/vendor/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:495:in `raw_load_rakefile'
/home/lucassus/Projects/example-project/vendor/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:78:in `block in load_rakefile'
/home/lucassus/Projects/example-project/vendor/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/home/lucassus/Projects/example-project/vendor/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:77:in `load_rakefile'
/home/lucassus/Projects/example-project/vendor/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:61:in `block in run'
/home/lucassus/Projects/example-project/vendor/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/home/lucassus/Projects/example-project/vendor/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/home/lucassus/Projects/example-project/vendor/gems/ruby/1.9.1/gems/rake-0.9.2/bin/rake:32:in `<top (required)>'
/home/lucassus/Projects/example-project/vendor/gems/ruby/1.9.1/bin/rake:19:in `load'
/home/lucassus/Projects/example-project/vendor/gems/ruby/1.9.1/bin/rake:19:in `<main>'
토론 #1
또한ci reporter 실행 사양을 사용하는 동안 몇 가지 문제가 발생했습니다. 다음을 참조하십시오.#bundle exec rake ci:setup:rspec spec CI_REPORTS=reports/ci_reporter
# TODO workaraung for ci_reporter and rspec-spy issue
bundle exec rspec spec --require=./vendor/gems/ruby/1.9.1/gems/ci_reporter-1.6.5//lib/ci/reporter/rake/rspec_loader.rb --format CI::Reporter::RSpec
토론 #2
창고 추적을 보니 rspec 스파이 한 줄만 보였습니다. 이것은 단지 테스트를 하는 것입니다.나는 이것이 rspec의 기대치의 문제일 수 있다고 약간 의심한다.나는 이것이 문제를 해결할 수 있는지 없는지를 보기 위해 rspec 스파이를 잠시 제거할 것을 건의합니다
토론 #셋
rspec 스파이를 삭제하면 이 문제를 해결할 수 있습니다.이 요청https://github.com/technicalpickles/rspec-spies/pull/4이 문제를 해결했다;)토론 #4
나는 이것이 63caebd13e7f985a1c215895480a94657d036b0b에서 복원되어야 한다고 생각한다.만약 그렇지 않다면 다시 열어 주세요.Reference
이 문제에 관하여(테스트 환경에서 라크 작업을 실행할 때 문제가 발생했습니다), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://github.com/technicalpickles/rspec-spies/issues/3텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)