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:
parent
57a514133b
commit
46f97aaad7
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue