Could not find generator rspec:install.

后端 未结 11 719
一向
一向 2021-01-01 08:03

I\'m trying to follow this tutorial here: http://railstutorial.org/chapters/static-pages#top

When I run:

$ rails generate rspec:install

11条回答
  •  自闭症患者
    2021-01-01 08:43

    Add gem 'rspec-rails' in Gemfile and save it. Run bundle command in Terminal. And in config/application.rb, add this line of configuration

    config.generators do |g|
      g.test_framework   :rspec, :fixture => true, :views => false
      g.integration_tool :rspec, :fixture => true, :views => true
    end
    

提交回复
热议问题