1
0
Fork 0
mirror of https://github.com/drapergem/draper synced 2023-03-27 23:21:17 -04:00

rspec-rails ~> 3.2 uses rails_helper fixes #668

As of rspec-rails 3.2 they generate two files:

  - spec/spec_helper.rb
  - spec/rails_helper.rb

This allows the user to either do pure ruby unit tests or include the entire rails environment. Draper really only works in a rails application if it has the rails environment. This matches ~> 3.2 and uses the rails_helper instead of spec_helper.
This commit is contained in:
Kurtis Rainbolt-Greene 2015-05-23 20:24:23 -05:00
parent 57a514133b
commit 46f97aaad7

View file

@ -1,4 +1,9 @@
require 'spec_helper'
<% if RSpec::Rails::Version::STRING.match(/\A3\.[^10]/) %>
require 'rails_helper'
<% else %>
require 'spec_helper'
<% end %>
describe <%= class_name %>Decorator do
end