From 4d3cd9b43f6b7425ca3eee303773d2221e8af38f Mon Sep 17 00:00:00 2001 From: Yehuda Katz and Carl Lerche Date: Mon, 6 Apr 2009 12:35:24 -0700 Subject: Changes necessary to run the T::U tests with the rspec runner --- actionpack/test/new_base/test_helper.rb | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'actionpack/test/new_base') diff --git a/actionpack/test/new_base/test_helper.rb b/actionpack/test/new_base/test_helper.rb index e33b4239ad..5ed4dd3f12 100644 --- a/actionpack/test/new_base/test_helper.rb +++ b/actionpack/test/new_base/test_helper.rb @@ -67,12 +67,21 @@ class Rack::TestCase < ActiveSupport::TestCase ActionController::Routing.use_controllers!(controllers) end - def self.describe(text) - class_eval <<-RUBY_EVAL - def self.name - "#{text}" - end - RUBY_EVAL + unless method_defined?(:describe) + def self.describe(text) + class_eval <<-RUBY_EVAL + def self.name + "#{text}" + end + RUBY_EVAL + end + end + + if defined?(Spec) + class << self + undef test + alias_method :test, :it + end end def app -- cgit v1.2.3