2014-09-02 18:07:02 +05:30
|
|
|
#!/usr/bin/env ruby
|
2018-05-09 12:01:36 +05:30
|
|
|
|
|
|
|
# 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 ...`
|
2018-12-23 12:14:25 +05:30
|
|
|
gemfile = %w[0 false].include?(ENV["RAILS5"]) ? "Gemfile.rails4" : "Gemfile"
|
2018-05-09 12:01:36 +05:30
|
|
|
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../#{gemfile}", __dir__)
|
|
|
|
|
2014-09-02 18:07:02 +05:30
|
|
|
begin
|
2016-06-02 11:05:42 +05:30
|
|
|
load File.expand_path('../spring', __FILE__)
|
|
|
|
rescue LoadError => e
|
|
|
|
raise unless e.message.include?('spring')
|
2014-09-02 18:07:02 +05:30
|
|
|
end
|
|
|
|
require 'bundler/setup'
|
2015-04-26 12:48:37 +05:30
|
|
|
load Gem.bin_path('rspec-core', 'rspec')
|