Skip to content

Commit

Permalink
Add coverage for string bodies, should have exposed raggi#11, but did…
Browse files Browse the repository at this point in the history
…n't.
  • Loading branch information
raggi committed Feb 20, 2012
1 parent 65fedfe commit 839b87e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/test_async.rb
Expand Up @@ -26,6 +26,10 @@ def self.singletons
body { 'hello async' }
end

aget '/world' do
body 'world'
end

aget '/em' do
EM.add_timer(0.001) { body { 'em' }; EM.stop }
end
Expand Down Expand Up @@ -232,4 +236,12 @@ def test_basic_async_head
assert_equal '', last_response.body
assert_equal "11", last_response.headers['Content-Length']
end

def test_string_body
get '/world'
assert_async
async_continue
assert last_response.ok?
assert_equal 'world', last_response.body
end
end

0 comments on commit 839b87e

Please sign in to comment.