Error when trying to run rspec: `require': cannot load such file — rails_helper (LoadError)

后端 未结 13 779
青春惊慌失措
青春惊慌失措 2020-12-13 03:13

I am trying to run rspec for Ruby on Rails. I am running Rails 4.1.1. I have installed the gem, have established a spec folder with some tests. I have created a directory

13条回答
  •  南笙
    南笙 (楼主)
    2020-12-13 03:55

    For someone. If you got that error when you trynna test a specific file. you might can like this

    $ bundle exec rspec ./spec/features/user_login_spec.rb
    $ bundle exec rspec ./spec/models/user_login_spec.rb
    

提交回复
热议问题