aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support
diff options
context:
space:
mode:
authorYehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>2009-07-02 16:03:41 -0700
committerYehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>2009-07-02 16:03:41 -0700
commit1d280e21a19aff74e1b35779be2633e6efa511f0 (patch)
tree6bc9775d4baf60270a154602ea39294feb03238a /activesupport/lib/active_support
parent940aad225af0b963f435a0bf015daece2218d502 (diff)
downloadrails-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 'activesupport/lib/active_support')
-rw-r--r--activesupport/lib/active_support/testing/isolation.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/testing/isolation.rb b/activesupport/lib/active_support/testing/isolation.rb
index 090e0c5c89..dd13abcd5d 100644
--- a/activesupport/lib/active_support/testing/isolation.rb
+++ b/activesupport/lib/active_support/testing/isolation.rb
@@ -21,6 +21,11 @@ module ActiveSupport::Testing
end
def run(result)
+ unless defined?(@@ran_class_setup)
+ self.class.setup
+ @@ran_class_setup = true
+ end
+
yield(Test::Unit::TestCase::STARTED, name)
@_result = result