From 2cc0cac3efce92bf9d0e8636f2889c37ca9f57ab Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Fri, 26 Oct 2007 02:21:21 +0000 Subject: Introduce TestCase subclasses for testing rails applications allowing tests to be DRY'd up a bit and to provide a path toward tidying up our monkeypatching of test/unit. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8022 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/lib/active_support.rb | 2 ++ activesupport/lib/active_support/test_case.rb | 5 +++++ activesupport/lib/active_support/testing.rb | 1 + activesupport/lib/active_support/testing/default.rb | 11 +++++++++++ 4 files changed, 19 insertions(+) create mode 100644 activesupport/lib/active_support/test_case.rb create mode 100644 activesupport/lib/active_support/testing.rb create mode 100644 activesupport/lib/active_support/testing/default.rb (limited to 'activesupport/lib') diff --git a/activesupport/lib/active_support.rb b/activesupport/lib/active_support.rb index e33f6ceb27..0b3816ec01 100644 --- a/activesupport/lib/active_support.rb +++ b/activesupport/lib/active_support.rb @@ -45,3 +45,5 @@ require 'active_support/json' require 'active_support/multibyte' +require 'active_support/testing' + diff --git a/activesupport/lib/active_support/test_case.rb b/activesupport/lib/active_support/test_case.rb new file mode 100644 index 0000000000..be8f8b17fc --- /dev/null +++ b/activesupport/lib/active_support/test_case.rb @@ -0,0 +1,5 @@ +module ActiveSupport + class TestCase < Test::Unit::TestCase + include ActiveSupport::Testing::Default + end +end \ No newline at end of file diff --git a/activesupport/lib/active_support/testing.rb b/activesupport/lib/active_support/testing.rb new file mode 100644 index 0000000000..1bf30cbbdd --- /dev/null +++ b/activesupport/lib/active_support/testing.rb @@ -0,0 +1 @@ +require 'active_support/testing/default' \ No newline at end of file diff --git a/activesupport/lib/active_support/testing/default.rb b/activesupport/lib/active_support/testing/default.rb new file mode 100644 index 0000000000..0cb0eea7d2 --- /dev/null +++ b/activesupport/lib/active_support/testing/default.rb @@ -0,0 +1,11 @@ +module ActiveSupport + module Testing + module Default + def run(*args) + return if method_name == :default_test + super + end + end + end +end + -- cgit v1.2.3