Ruby Debug “no such file to load --spec_helper”

前端 未结 2 1455
温柔的废话
温柔的废话 2021-02-13 01:56

Noob who may be missing something obvious ... I\'m trying to debug an Rspec file. The Rspec file is stripped down at this point:

  require \'spec_helper\'

  de         


        
相关标签:
2条回答
  • 2021-02-13 02:12

    I assume your spec_helper.rb resides in the spec directory? Try:

    require_relative '../spec_helper'
    
    0 讨论(0)
  • 2021-02-13 02:26

    Make sure you've run

    rails generate rspec:install
    

    to create the spec_helper.rb file.

    0 讨论(0)
提交回复
热议问题