|
Revision 7593, 0.7 kB
(checked in by bitsweat, 1 year ago)
|
RailsFCGIHandler tests. Closes #9630.
|
| Line | |
|---|
| 1 |
$:.unshift File.dirname(__FILE__) + "/../../activesupport/lib" |
|---|
| 2 |
$:.unshift File.dirname(__FILE__) + "/../../actionpack/lib" |
|---|
| 3 |
$:.unshift File.dirname(__FILE__) + "/../lib" |
|---|
| 4 |
$:.unshift File.dirname(__FILE__) + "/../builtin/rails_info" |
|---|
| 5 |
|
|---|
| 6 |
require 'test/unit' |
|---|
| 7 |
require 'stringio' |
|---|
| 8 |
require 'active_support' |
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
def uses_mocha(test_name) |
|---|
| 12 |
require 'rubygems' |
|---|
| 13 |
gem 'mocha', '>= 0.5.5' |
|---|
| 14 |
require 'mocha' |
|---|
| 15 |
yield |
|---|
| 16 |
rescue LoadError |
|---|
| 17 |
$stderr.puts "Skipping #{test_name} tests. `gem install mocha` and try again." |
|---|
| 18 |
end |
|---|
| 19 |
|
|---|
| 20 |
if defined?(RAILS_ROOT) |
|---|
| 21 |
RAILS_ROOT.replace File.dirname(__FILE__) |
|---|
| 22 |
else |
|---|
| 23 |
RAILS_ROOT = File.dirname(__FILE__) |
|---|
| 24 |
end |
|---|