aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/test/new_base/test_helper.rb21
1 files changed, 15 insertions, 6 deletions
diff --git a/actionpack/test/new_base/test_helper.rb b/actionpack/test/new_base/test_helper.rb
index c472a943e5..420abe58f7 100644
--- a/actionpack/test/new_base/test_helper.rb
+++ b/actionpack/test/new_base/test_helper.rb
@@ -73,12 +73,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