aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test')
-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 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