test/response_test.rb in faraday-0.0.1 vs test/response_test.rb in faraday-0.0.2
- old
+ new
@@ -12,20 +12,20 @@
end
end
describe "TestConnection#get with default Faraday::Response class" do
it "returns Faraday::Response" do
- conn = TestConnection.new do |stub|
+ conn = Faraday::TestConnection.new do |stub|
stub.get('/hello') { [200, {}, 'hello world']}
end
resp = conn.get('/hello')
assert_equal 'hello world', resp.body
end
end
describe "TestConnection#get with Faraday::YajlResponse class" do
it "returns string body" do
- conn = TestConnection.new do |stub|
+ conn = Faraday::TestConnection.new do |stub|
stub.get('/hello') { [200, {}, '[1,2,3]']}
end
conn.response_class = Faraday::Response::YajlResponse
assert_equal [1,2,3], conn.get('/hello').body
end