aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/string_coercion_test.rb
diff options
context:
space:
mode:
authorMikel Lindsaar <raasdnil@gmail.com>2010-01-17 12:46:51 +1100
committerMikel Lindsaar <raasdnil@gmail.com>2010-01-17 12:46:51 +1100
commit6f663addaa7ed40f1133687d7a2be0958bf0c059 (patch)
tree7beb7f092c1979d1fd5ea6e7aaaf4f59c2f4abf4 /actionpack/test/dispatch/string_coercion_test.rb
parent8834b2612b7ddda70ee6a685eb0063d3daa8e63d (diff)
parent3e94032227d450d479f511070c51f37f53d0ecc4 (diff)
downloadrails-6f663addaa7ed40f1133687d7a2be0958bf0c059.tar.gz
rails-6f663addaa7ed40f1133687d7a2be0958bf0c059.tar.bz2
rails-6f663addaa7ed40f1133687d7a2be0958bf0c059.zip
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'actionpack/test/dispatch/string_coercion_test.rb')
-rw-r--r--actionpack/test/dispatch/string_coercion_test.rb40
1 files changed, 0 insertions, 40 deletions
diff --git a/actionpack/test/dispatch/string_coercion_test.rb b/actionpack/test/dispatch/string_coercion_test.rb
deleted file mode 100644
index d79b17b932..0000000000
--- a/actionpack/test/dispatch/string_coercion_test.rb
+++ /dev/null
@@ -1,40 +0,0 @@
-require 'abstract_unit'
-
-class StringCoercionTest < ActiveSupport::TestCase
- test "body responds to each" do
- original_body = []
- body = ActionDispatch::StringCoercion::UglyBody.new(original_body)
-
- assert original_body.respond_to?(:each)
- assert body.respond_to?(:each)
- end
-
- test "body responds to to_path" do
- original_body = []
- def original_body.to_path; end
- body = ActionDispatch::StringCoercion::UglyBody.new(original_body)
-
- assert original_body.respond_to?(:to_path)
- assert body.respond_to?(:to_path)
- end
-
- test "body does not responds to to_path" do
- original_body = []
- body = ActionDispatch::StringCoercion::UglyBody.new(original_body)
-
- assert !original_body.respond_to?(:to_path)
- assert !body.respond_to?(:to_path)
- end
-
- test "calls to_s on body parts" do
- app = lambda { |env|
- [200, {'Content-Type' => 'html'}, [1, 2, 3]]
- }
- app = ActionDispatch::StringCoercion.new(app)
- parts = []
- status, headers, body = app.call({})
- body.each { |part| parts << part }
-
- assert_equal %w( 1 2 3 ), parts
- end
-end