diff options
author | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-07-02 16:03:41 -0700 |
---|---|---|
committer | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-07-02 16:03:41 -0700 |
commit | 1d280e21a19aff74e1b35779be2633e6efa511f0 (patch) | |
tree | 6bc9775d4baf60270a154602ea39294feb03238a /railties/test | |
parent | 940aad225af0b963f435a0bf015daece2218d502 (diff) | |
download | rails-1d280e21a19aff74e1b35779be2633e6efa511f0.tar.gz rails-1d280e21a19aff74e1b35779be2633e6efa511f0.tar.bz2 rails-1d280e21a19aff74e1b35779be2633e6efa511f0.zip |
Adds support for def self.setup in isolation tests for setup that should be run only once in the parent
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/initializer/path_test.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/railties/test/initializer/path_test.rb b/railties/test/initializer/path_test.rb index 8fbad24a73..db62796ea5 100644 --- a/railties/test/initializer/path_test.rb +++ b/railties/test/initializer/path_test.rb @@ -8,14 +8,15 @@ module Rails def self.vendor_rails? ; false ; end end -# TODO: Can this be reset? -Rails::Initializer.run do |config| - config.frameworks = [:action_controller, :action_view, :action_mailer, :active_record] -end - class PathsTest < ActiveSupport::TestCase include ActiveSupport::Testing::Isolation + def self.setup + Rails::Initializer.run do |config| + config.frameworks = [:action_controller, :action_view, :action_mailer, :active_record] + end + end + def setup @paths = Rails::Initializer.default.config.paths end |