0
$ bundle exec rspec spec/requests/static_pages_spec.rb
3.2.1章但是,我發現了以下錯誤之前測試甚至可以運行:
/Users/alexrahr/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `load': cannot load such file -- /Users/alexrahr/Apps/ruby.railstutorial.org/rails_projects/sample_app/app/spec/requests/static_pages_spec.rb (LoadError)
from /Users/alexrahr/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `block in load_spec_files'
from /Users/alexrahr/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `each'
from /Users/alexrahr/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `load_spec_files'
from /Users/alexrahr/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.13.1/lib/rspec/core/command_line.rb:22:in `run'
from /Users/alexrahr/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:80:in `run'
from /Users/alexrahr/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:17:in `block in autorun'
任何想法可能是什麼?我猜這是我沒有安裝RSpec gem?
FYI剛纔檢查,我在寶石文件中確實有Rspec的 '組:發展:測試做 寶石 'sqlite3的', '1.3.8' 寶石 'RSpec的護欄', '2.13.1' 結束 組:測試做 寶石 '硒webdriver的', '2.35.1' 寶石 '水豚', '2.1.0' end' –
解決了它 - 試圖從錯誤的文件夾運行命令... –