aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2010-01-04 19:46:21 -0600
committerJoshua Peek <josh@joshpeek.com>2010-01-04 19:46:21 -0600
commit3f28e0bda6386ed25d07182dd39b84f6a7d330da (patch)
treeed8c45a6cc2a179a7c4786348fd09e81f89984ce /actionpack/test/dispatch
parent76b5f18feba3f1d0507b4c4ec34d11d9bb1c493c (diff)
downloadrails-3f28e0bda6386ed25d07182dd39b84f6a7d330da.tar.gz
rails-3f28e0bda6386ed25d07182dd39b84f6a7d330da.tar.bz2
rails-3f28e0bda6386ed25d07182dd39b84f6a7d330da.zip
Trash string coercion rack hacks
Diffstat (limited to 'actionpack/test/dispatch')
-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