aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/testing/declarative.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2012-07-08 14:51:57 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2012-07-08 14:51:57 -0700
commit5921cf0b45b602d02908f30da19f8e7aed262d88 (patch)
treee7f0655e91bce2f5cdcfc5a24ac981d466f7b273 /activesupport/lib/active_support/testing/declarative.rb
parent3dc54d7e906ba356ece3956e168db3db80664877 (diff)
downloadrails-5921cf0b45b602d02908f30da19f8e7aed262d88.tar.gz
rails-5921cf0b45b602d02908f30da19f8e7aed262d88.tar.bz2
rails-5921cf0b45b602d02908f30da19f8e7aed262d88.zip
we still need `describe` as the implementation differs from minitest
Diffstat (limited to 'activesupport/lib/active_support/testing/declarative.rb')
-rw-r--r--activesupport/lib/active_support/testing/declarative.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/testing/declarative.rb b/activesupport/lib/active_support/testing/declarative.rb
new file mode 100644
index 0000000000..db554a9542
--- /dev/null
+++ b/activesupport/lib/active_support/testing/declarative.rb
@@ -0,0 +1,22 @@
+module ActiveSupport
+ module Testing
+ module Declarative
+
+ def self.extended(klass) #:nodoc:
+ klass.class_eval do
+
+ unless method_defined?(:describe)
+ def self.describe(text)
+ class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1
+ def self.name
+ "#{text}"
+ end
+ RUBY_EVAL
+ end
+ end
+
+ end
+ end
+ end
+ end
+end