From e931012287df0bca83cae04d95c2e0835ae08758 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sun, 23 Nov 2008 14:48:36 -0800 Subject: Require Mocha >= 0.9.3 which includes a MiniTest adapter --- .../testing/mocha_minitest_adapter.rb | 45 ---------------------- 1 file changed, 45 deletions(-) delete mode 100644 activesupport/lib/active_support/testing/mocha_minitest_adapter.rb (limited to 'activesupport/lib/active_support/testing') diff --git a/activesupport/lib/active_support/testing/mocha_minitest_adapter.rb b/activesupport/lib/active_support/testing/mocha_minitest_adapter.rb deleted file mode 100644 index a96ce74526..0000000000 --- a/activesupport/lib/active_support/testing/mocha_minitest_adapter.rb +++ /dev/null @@ -1,45 +0,0 @@ -class MiniTest::Unit::TestCase - include Mocha::Standalone - - class MochaAssertionCounter - def initialize(runner) @runner = runner end - def increment; @runner.assertion_count += 1 end - end - - def run(runner) - assertion_counter = MochaAssertionCounter.new(runner) - result = '.' - begin - begin - @passed = nil - setup - __send__ name - mocha_verify(assertion_counter) - @passed = true - rescue Exception => e - @passed = false - result = runner.puke(self.class, self.name, e) - ensure - begin - teardown - rescue Exception => e - result = runner.puke(self.class, self.name, e) - end - end - ensure - mocha_teardown - end - result - end -end - -module Test - module Unit - remove_const :TestCase - - class TestCase < MiniTest::Unit::TestCase - include Test::Unit::Assertions - def self.test_order; :sorted end - end - end -end -- cgit v1.2.3