blob: ddb03397abf900b61f2be337a2deca48376d04db (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
require 'abstract_unit'
require 'active_support/ruby/shim'
require 'initializer'
RAILS_ROOT.replace File.join(File.dirname(__FILE__), "root")
module Rails
class << self
attr_accessor :vendor_rails
def vendor_rails?() @vendor_rails end
end
end
class ActiveSupport::TestCase
def assert_stderr(match)
$stderr = StringIO.new
yield
$stderr.rewind
err = $stderr.read
assert_match match, err
ensure
$stderr = STDERR
end
end
|