JavaEar 专注于收集分享传播有价值的技术资料

rspec-rails generator doesn't create spec/rails_helper.rb

I created new Rails app, then added gem 'rspec-rails' to Gemfile, bundle install-ed, and launched

rails g rspec:install
  create  .rspec   
  create  spec
  create  spec/spec_helper.rb

Why it didn't create spec/rails_helper.rb ?

My Gemfile is being generated with new Rails aplication with empty lines and comments removed. I only added the last line to it.

source 'https://rubygems.org'
gem 'rails', '4.0.3'
gem 'sqlite3'
gem 'sass-rails', '~> 4.0.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 1.2'
group :doc do
  gem 'sdoc', require: false
end
gem 'rspec-rails'

1个回答

    最佳答案
  1. rails_helper.rb is new to Rspec Rails 3.x. You may be running an earlier version. Check your Gemfile.lock or run bundle list | grep rspec-rails to see which version you're running.