Update to Rails 2.3.9 and itextomml 1.3.27
This commit is contained in:
parent
113e0af736
commit
ef30cc22df
200 changed files with 3065 additions and 1204 deletions
24
vendor/rails/railties/test/initializer_test.rb
vendored
24
vendor/rails/railties/test/initializer_test.rb
vendored
|
@ -4,6 +4,7 @@ require 'initializer'
|
|||
require 'action_view'
|
||||
require 'action_mailer'
|
||||
require 'active_record'
|
||||
require 'stringio'
|
||||
|
||||
# Mocks out the configuration
|
||||
module Rails
|
||||
|
@ -36,7 +37,7 @@ class Initializer_eager_loading_Test < Test::Unit::TestCase
|
|||
def setup
|
||||
@config = ConfigurationMock.new("")
|
||||
@config.cache_classes = true
|
||||
@config.load_paths = [File.expand_path(File.dirname(__FILE__) + "/fixtures/eager")]
|
||||
@config.autoload_paths = [File.expand_path(File.dirname(__FILE__) + "/fixtures/eager")]
|
||||
@config.eager_load_paths = [File.expand_path(File.dirname(__FILE__) + "/fixtures/eager")]
|
||||
@initializer = Rails::Initializer.new(@config)
|
||||
@initializer.set_load_path
|
||||
|
@ -50,6 +51,27 @@ class Initializer_eager_loading_Test < Test::Unit::TestCase
|
|||
end
|
||||
end
|
||||
|
||||
class DeprecatedPathsInConfiguration < ActiveSupport::TestCase
|
||||
def test_paths_deprecations
|
||||
config = Rails::Configuration.new
|
||||
match_in_stderr(/use autoload_paths(?!=)/) { config.load_paths }
|
||||
match_in_stderr(/use autoload_paths=/) { config.load_paths = [] }
|
||||
match_in_stderr(/use autoload_once_paths(?!=)/) { config.load_once_paths }
|
||||
match_in_stderr(/use autoload_once_paths=/) { config.load_once_paths = [] }
|
||||
end
|
||||
|
||||
# The initializer prints to $stderr because neither AS nor logger are available
|
||||
# at that point.
|
||||
def match_in_stderr(regexp)
|
||||
$stderr = StringIO.new
|
||||
yield
|
||||
$stderr.rewind
|
||||
assert_match regexp, $stderr.read
|
||||
ensure
|
||||
$stderr = STDERR
|
||||
end
|
||||
end
|
||||
|
||||
class Initializer_after_initialize_with_blocks_environment_Test < Test::Unit::TestCase
|
||||
def setup
|
||||
config = ConfigurationMock.new("")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue