aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/abstract/callbacks_test.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-06-28 00:12:15 +0200
committerXavier Noria <fxn@hashref.com>2010-06-28 00:12:15 +0200
commit4329f8133fee8e4f3e558787f67de59f0c4a4dd1 (patch)
tree346ef7340d8348e50d119ca749a16c1654c20a08 /actionpack/test/abstract/callbacks_test.rb
parentc37f7d66e49ffe5ac2115cc30e5529fd1c2924a8 (diff)
parentebee77a28a7267d5f23a28ba23c1eb88a2d7d527 (diff)
downloadrails-4329f8133fee8e4f3e558787f67de59f0c4a4dd1.tar.gz
rails-4329f8133fee8e4f3e558787f67de59f0c4a4dd1.tar.bz2
rails-4329f8133fee8e4f3e558787f67de59f0c4a4dd1.zip
Merge remote branch 'rails/master'
Diffstat (limited to 'actionpack/test/abstract/callbacks_test.rb')
-rw-r--r--actionpack/test/abstract/callbacks_test.rb14
1 files changed, 12 insertions, 2 deletions
diff --git a/actionpack/test/abstract/callbacks_test.rb b/actionpack/test/abstract/callbacks_test.rb
index 0ce1dc506b..232a1679e0 100644
--- a/actionpack/test/abstract/callbacks_test.rb
+++ b/actionpack/test/abstract/callbacks_test.rb
@@ -47,8 +47,12 @@ module AbstractController
end
def index
- self.response_body = @text
- end
+ self.response_body = @text.to_s
+ end
+ end
+
+ class Callback2Overwrite < Callback2
+ before_filter :first, :except => :index
end
class TestCallbacks2 < ActiveSupport::TestCase
@@ -70,6 +74,12 @@ module AbstractController
@controller.process(:index)
assert_equal "FIRSTSECOND", @controller.instance_variable_get("@aroundz")
end
+
+ test "before_filter with overwritten condition" do
+ @controller = Callback2Overwrite.new
+ result = @controller.process(:index)
+ assert_equal "", @controller.response_body
+ end
end
class Callback3 < ControllerWithCallbacks