简体   繁体   English

捆绑rspec / spec失败

[英]bundle rspec /spec is failing

I'm trying to run a test suite using rspec with the command(s) 我正在尝试使用带有命令的rspec运行测试套件

bundle exec rspec /spec/models/user_spec.rb

or 要么

bundle exec rspec /spec/requests

Results in the following error messages: 导致以下错误消息:

/Users/ms/.rvm/gems/ruby-1.9.3-p286/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:780:in `load': cannot load such file -- /spec/requests (LoadError)
from /Users/ms/.rvm/gems/ruby-1.9.3-p286/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:780:in `block in load_spec_files'
from /Users/ms/.rvm/gems/ruby-1.9.3-p286/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:780:in `map'
from /Users/ms/.rvm/gems/ruby-1.9.3-p286/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:780:in `load_spec_files'
from /Users/ms/.rvm/gems/ruby-1.9.3-p286/gems/rspec-core-2.11.1/lib/rspec/core/command_line.rb:22:in `run'
from /Users/ms/.rvm/gems/ruby-1.9.3-p286/gems/rspec-core-2.11.1/lib/rspec/core/runner.rb:69:in `run'
from /Users/ms/.rvm/gems/ruby-1.9.3-p286/gems/rspec-core-2.11.1/lib/rspec/core/runner.rb:8:in `block in autorun'

I receive this error Even if i revert back to a default test file like: 我收到此错误,即使我恢复为默认的测试文件,例如:

require 'spec_helper'
describe User do
  pending "add some examples to (or delete) #{__FILE__}"
end

it seems like I've messed up the gem but I'm unsure how to fix it. 好像我弄乱了宝石,但不确定如何解决。 Any ideas? 有任何想法吗?

删除前导的正斜杠:

bundle exec rspec spec/models/user_spec.rb

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM