Created
February 24, 2010 11:26
-
-
Save karmi/313341 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/test/filter_test.rb b/test/filter_test.rb | |
index b4bbda1..bd1daeb 100644 | |
--- a/test/filter_test.rb | |
+++ b/test/filter_test.rb | |
@@ -181,6 +181,16 @@ class AfterFilterTest < Test::Unit::TestCase | |
assert_equal 'cool', body | |
end | |
+ it "does modify the response body" do | |
+ mock_app { | |
+ get('/foo') { 'cool' } | |
+ after { response.body = 'uncool' } | |
+ } | |
+ get '/foo' | |
+ assert ok? | |
+ assert_equal 'uncool', body | |
+ end | |
+ | |
it "does modify the response with halt" do | |
mock_app { | |
get '/foo' do |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment