Merge pull request #231 from lucasmazza/struct-members

Convert Env keys to symbols
This commit is contained in:
rick 2013-01-08 05:44:42 -08:00
commit b9e89c7562
2 changed files with 4 additions and 1 deletions

View File

@ -67,7 +67,7 @@ module Faraday
hash = {}
members.each do |key|
value = send(key)
hash[key] = value if value
hash[key.to_sym] = value if value
end
hash
end

View File

@ -184,6 +184,9 @@ class ResponseTest < Faraday::TestCase
hash = @response.to_hash
assert_kind_of Hash, hash
assert_equal @env.to_hash, hash
assert_equal hash[:status], @response.status
assert_equal hash[:response_headers], @response.headers
assert_equal hash[:body], @response.body
end
end