Sha256: 66aed9a574efe8fcc446084d785fd9ac38a08688be7364855611d0d6d50e185c
Contents?: true
Size: 784 Bytes
Versions: 5
Compression:
Stored size: 784 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') require 'webmock_spec' require 'ostruct' require 'httpclient' require 'httpclient_spec_helper' describe "Webmock with HTTPClient" do include HTTPClientSpecHelper before(:each) do HTTPClientSpecHelper.async_mode = false end it_should_behave_like "WebMock" it "should yield block on response if block provided" do stub_http_request(:get, "www.example.com").to_return(:body => "abc") response_body = "" http_request(:get, "http://www.example.com/") do |body| response_body = body end response_body.should == "abc" end describe "async requests" do before(:each) do HTTPClientSpecHelper.async_mode = true end it_should_behave_like "WebMock" end end
Version data entries
5 entries across 5 versions & 1 rubygems