Skip to content

Commit

Permalink
remove deprecated code. Rely on describe provided by minitest
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Jun 11, 2014
1 parent 80b4fe2 commit a5ab38c
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions activesupport/lib/active_support/testing/declarative.rb
Original file line number Diff line number Diff line change
@@ -1,30 +1,6 @@
module ActiveSupport
module Testing
module Declarative

def self.extended(klass) #:nodoc:
klass.class_eval do

unless method_defined?(:describe)
def self.describe(text)
if block_given?
super
else
message = "`describe` without a block is deprecated, please switch to: `def self.name; #{text.inspect}; end`\n"
ActiveSupport::Deprecation.warn message

class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1
def self.name
"#{text}"
end
RUBY_EVAL
end
end
end

end
end

unless defined?(Spec)
# Helper to define a test method using a String. Under the hood, it replaces
# spaces with underscores and defines the test method.
Expand Down

0 comments on commit a5ab38c

Please sign in to comment.