Sha256: f5e806919f0f451af10dc02971cec0284db4e5b4414cbf2e996c26c8710b7b9a

Contents?: true

Size: 1.1 KB

Versions: 31

Compression:

Stored size: 1.1 KB

Contents

require File.expand_path('../../spec_helper', __FILE__)

describe HttpUtilities::Http::Client do

  describe "when modules have been included" do
    before(:each) do
      @client     =   HttpUtilities::Http::Client.new
      @request    =   HttpUtilities::Http::Request.new
      @response   =   HttpUtilities::Http::Response.new
    end

    it "should respond to #get" do
      @client.should respond_to(:get)
    end

    it "should respond to #post" do
      @client.should respond_to(:post)
    end

    it "should respond to a proxy module method" do
      @request.should respond_to(:set_proxy_options)
    end

    it "should respond to a user agent module method" do
      @request.should respond_to(:user_agent)
    end

    it "should respond to a format module method" do
      @response.should respond_to(:as_html)
    end
  end

  describe "when initialized" do
    before(:each) do
      @client     =   HttpUtilities::Http::Client.new
      @request    =   HttpUtilities::Http::Request.new
    end

    it "should have assigned user agent" do
      @request.user_agent.should_not == nil
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
http_utilities-1.4.3 spec/http_utilities/client_spec.rb
http_utilities-1.4.2 spec/http_utilities/client_spec.rb
http_utilities-1.4.1 spec/http_utilities/client_spec.rb
http_utilities-1.4.0 spec/http_utilities/client_spec.rb
http_utilities-1.3.9 spec/http_utilities/client_spec.rb
http_utilities-1.3.8 spec/http_utilities/client_spec.rb
http_utilities-1.3.7 spec/http_utilities/client_spec.rb
http_utilities-1.3.6 spec/http_utilities/client_spec.rb
http_utilities-1.3.5 spec/http_utilities/client_spec.rb
http_utilities-1.3.4 spec/http_utilities/client_spec.rb
http_utilities-1.3.3 spec/http_utilities/client_spec.rb
http_utilities-1.3.2 spec/http_utilities/client_spec.rb
http_utilities-1.3.1 spec/http_utilities/client_spec.rb
http_utilities-1.3.0 spec/http_utilities/client_spec.rb
http_utilities-1.2.7 spec/http_utilities/client_spec.rb
http_utilities-1.2.6.5 spec/http_utilities/client_spec.rb
http_utilities-1.2.6.4 spec/http_utilities/client_spec.rb
http_utilities-1.2.6.3 spec/http_utilities/client_spec.rb
http_utilities-1.2.6.2 spec/http_utilities/client_spec.rb
http_utilities-1.2.6.1 spec/http_utilities/client_spec.rb