This repository has been archived by the owner on Aug 16, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5c6d1c7
commit c9abdcc
Showing
3 changed files
with
4 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,8 @@ | ||
#!/usr/bin/env ruby | ||
gem 'test-unit', '1.2.3' if RUBY_VERSION.to_f >= 1.9 | ||
rails_root = File.expand_path(File.dirname(__FILE__) + "/..") | ||
rspec_gem_dir = nil | ||
Dir["#{rails_root}/vendor/gems/*"].each do |subdir| | ||
rspec_gem_dir = subdir if subdir.gsub("#{rails_root}/vendor/gems/","") =~ /^(\w+-)?rspec-(\d+)/ && File.exist?("#{subdir}/lib/spec/rake/spectask.rb") | ||
end | ||
rspec_plugin_dir = File.expand_path("#{rails_root}/vendor/plugins/rspec") | ||
|
||
if rspec_gem_dir && (test ?d, rspec_plugin_dir) | ||
raise "\n#{'*'*50}\nYou have rspec installed in both vendor/gems and vendor/plugins\nPlease pick one and dispose of the other.\n#{'*'*50}\n\n" | ||
end | ||
|
||
if rspec_gem_dir | ||
$LOAD_PATH.unshift("#{rspec_gem_dir}/lib") | ||
elsif File.exist?(rspec_plugin_dir) | ||
$LOAD_PATH.unshift("#{rspec_plugin_dir}/lib") | ||
else | ||
require 'rubygems' unless ENV['NO_RUBYGEMS'] | ||
end | ||
ENV['RAILS_ENV'] ||= 'test' | ||
require File.join(File.dirname(__FILE__), "/../config/environment") | ||
|
||
require 'spec/autorun' | ||
exit ::Spec::Runner::CommandLine.run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters