#!/usr/bin/env jruby

ENV['BUNDLE_GEMFILE'] ||= File.join(Dir.pwd, 'Gemfile')

require 'rubygems'
require 'bundler/setup'

# Because of how Spring application is started from within RSpec, the
# process will not finish, if all RSpec tests pass. Look at code in
# rspec-core-2.14.5/lib/rspec/core/runner.rb#self.autorun to understand
# why.

require 'rspec/core'
RSpec::Core::Runner.disable_autorun!

load Gem.bin_path('rspec-core', 'rspec')
exit RSpec::Core::Runner.run ARGV
