Skip to content

Commit e734820

Browse files
committed
simplify test
1 parent 3a8b250 commit e734820

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

spec/integration/empty_body_spec.rb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,13 @@ def response(env)
77
end
88

99
describe 'Empty body API' do
10+
let(:err) { Proc.new { fail "API request failed" } }
11+
1012
it 'serves a 201 with no body' do
1113
with_api(Empty) do
12-
http = EM::HttpRequest.new('http://localhost:9000').get
13-
http.errback { fail }
14-
http.callback do |c|
14+
get_request({}, err) do |c|
1515
c.response_header.status.should == 201
1616
c.response_header['CONTENT_LENGTH'].should == '0'
17-
stop
1817
end
1918
end
2019
end

0 commit comments

Comments
 (0)