avoid to_enum warning on 2.0

This commit is contained in:
Konstantin Haase 2013-03-10 13:08:47 +01:00
parent 3223f194f6
commit 397dbc768c
1 changed files with 1 additions and 2 deletions

View File

@ -6,8 +6,7 @@ class ResponseTest < Test::Unit::TestCase
setup { @response = Sinatra::Response.new }
def assert_same_body(a, b)
enum = Enumerable.const_get(:Enumerator)
assert_equal enum.new(a).to_a, enum.new(b).to_a
assert_equal a.to_enum(:each).to_a, b.to_enum(:each).to_a
end
it "initializes with 200, text/html, and empty body" do