Permalink
Browse files

Do not deprecate performed?

  • Loading branch information...
1 parent ff813dc commit 08d6eb6824fbab64f4b0578a9ce6f7fd7213f3c7 @josevalim josevalim committed Jan 19, 2012
@@ -192,6 +192,10 @@ def response_body=(val)
super body
end
+ def performed?
+ response_body
+ end
+
def dispatch(name, request) #:nodoc:
@_request = request
@_env = request.env
@@ -60,11 +60,5 @@ def _handle_method_missing
def method_for_action(action_name)
super || (respond_to?(:method_missing) && "_handle_method_missing")
end
-
- def performed?
- ActiveSupport::Deprecation.warn "Calling `performed?` is deprecated and will " \
- "be removed in Rails 4.0. Please check for `response_body` presence instead.", caller
- response_body
- end
end
end
@@ -116,6 +116,12 @@ def setup
Submodule::ContainedNonEmptyController.new]
end
+ def test_performed?
+ assert !@empty.performed?
+ @empty.response_body = ["sweet"]
+ assert @empty.performed?
+ end
+
def test_action_methods
@empty_controllers.each do |c|
assert_equal Set.new, c.class.action_methods, "#{c.controller_path} should be empty!"

0 comments on commit 08d6eb6

Please sign in to comment.