Fixed Issue with RSpec Version Check

While the original spec passed, the generator did not work in practice
because RSpec is typically not required in full in the development
environment. The generator now explicitly requires RSpec::Version to
perform the check.
This commit is contained in:
Morgan Lieberthal 2015-09-17 12:07:04 -06:00
parent 978fad058c
commit deaef7287f
1 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,5 @@
<% if RSpec::Core::Version::STRING.match(/\A3\.[^10]/) %>
<% require 'rspec/version' %>
<% if RSpec::Version::STRING.match(/\A3\.[^10]/) %>
require 'rails_helper'
<% else %>
require 'spec_helper'