2014-02-16 05:22:03 -05:00
|
|
|
#!/usr/bin/env ruby
|
2018-04-02 19:01:34 -04:00
|
|
|
|
|
|
|
# Remove these two lines below when upgraded to rails 5.0.
|
|
|
|
# Allow run `rspec` command as `RAILS5=1 rspec ...` instead of `BUNDLE_GEMFILE=Gemfile.rails5 rspec ...`
|
|
|
|
gemfile = %w[1 true].include?(ENV["RAILS5"]) ? "Gemfile.rails5" : "Gemfile"
|
|
|
|
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../#{gemfile}", __dir__)
|
|
|
|
|
2014-02-16 05:22:03 -05:00
|
|
|
begin
|
2016-04-22 12:36:47 -04:00
|
|
|
load File.expand_path('../spring', __FILE__)
|
|
|
|
rescue LoadError => e
|
|
|
|
raise unless e.message.include?('spring')
|
2014-02-16 05:22:03 -05:00
|
|
|
end
|
|
|
|
require 'bundler/setup'
|
2015-02-12 13:17:35 -05:00
|
|
|
load Gem.bin_path('rspec-core', 'rspec')
|