aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/testing
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2011-01-09 10:15:05 -0800
committerSantiago Pastorino <santiago@wyeworks.com>2011-01-31 19:45:53 -0200
commit57bc25c5f8129f57b08a2dc7c319b86778dd8a40 (patch)
tree4e21728c5dd1866f654ed88d169552a77fa6483b /activesupport/lib/active_support/testing
parent9666b6a625c9fef555c2a18df6721fed2000f131 (diff)
downloadrails-57bc25c5f8129f57b08a2dc7c319b86778dd8a40.tar.gz
rails-57bc25c5f8129f57b08a2dc7c319b86778dd8a40.tar.bz2
rails-57bc25c5f8129f57b08a2dc7c319b86778dd8a40.zip
Use run_callbacks; the generated _run_<name>_callbacks method is not a public interface.
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Diffstat (limited to 'activesupport/lib/active_support/testing')
-rw-r--r--activesupport/lib/active_support/testing/setup_and_teardown.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/testing/setup_and_teardown.rb b/activesupport/lib/active_support/testing/setup_and_teardown.rb
index b2d9ddfeb7..22e41fa905 100644
--- a/activesupport/lib/active_support/testing/setup_and_teardown.rb
+++ b/activesupport/lib/active_support/testing/setup_and_teardown.rb
@@ -31,14 +31,14 @@ module ActiveSupport
def run(runner)
result = '.'
begin
- _run_setup_callbacks do
+ run_callbacks :setup do
result = super
end
rescue Exception => e
result = runner.puke(self.class, method_name, e)
ensure
begin
- _run_teardown_callbacks
+ run_callbacks :teardown
rescue Exception => e
result = runner.puke(self.class, method_name, e)
end
@@ -62,7 +62,7 @@ module ActiveSupport
begin
begin
- _run_setup_callbacks do
+ run_callbacks :setup do
setup
__send__(@method_name)
mocha_verify(mocha_counter) if mocha_counter
@@ -77,7 +77,7 @@ module ActiveSupport
ensure
begin
teardown
- _run_teardown_callbacks
+ run_callbacks :teardown
rescue Test::Unit::AssertionFailedError => e
add_failure(e.message, e.backtrace)
rescue Exception => e