Sha256: d6c4db08dfa676144ee8bf0aea452000548641673cbfa3ef0b875f2ecea822eb

Contents?: true

Size: 1006 Bytes

Versions: 28

Compression:

Stored size: 1006 Bytes

Contents

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

describe HttpUtilities::Http::Mechanize::Client do

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

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

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

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

    it "should have assigned user agents" do
      @client.user_agent.should_not be_nil
    end

    it "should submit a google search query successfully" do
      #mock this later on...
      page = @client.set_form_and_submit("http://www.google.com/webhp", {:name => "f"}, :first, {:q => {:type => :input, :value => "Ruby on Rails"}})
      page.parser.should_not be_nil
    end
  end

end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
http_utilities-1.2.7 spec/http_utilities/mechanize_client_spec.rb
http_utilities-1.2.6.5 spec/http_utilities/mechanize_client_spec.rb
http_utilities-1.2.6.4 spec/http_utilities/mechanize_client_spec.rb
http_utilities-1.2.6.3 spec/http_utilities/mechanize_client_spec.rb
http_utilities-1.2.6.2 spec/http_utilities/mechanize_client_spec.rb
http_utilities-1.2.6.1 spec/http_utilities/mechanize_client_spec.rb
http_utilities-1.2.6 spec/http_utilities/mechanize_client_spec.rb
http_utilities-1.2.5.3 spec/http_utilities/mechanize_client_spec.rb
http_utilities-1.2.5.2 spec/http_utilities/mechanize_client_spec.rb
http_utilities-1.2.5.1 spec/http_utilities/mechanize_client_spec.rb
http_utilities-1.2.5 spec/http_utilities/mechanize_client_spec.rb
http_utilities-1.2.4.1 spec/http_utilities/mechanize_client_spec.rb
http_utilities-1.2.4 spec/http_utilities/mechanize_client_spec.rb
http_utilities-1.2.3 spec/http_utilities/mechanize_client_spec.rb
http_utilities-1.2.2 spec/http_utilities/mechanize_client_spec.rb
http_utilities-1.2.0 spec/http_utilities/mechanize_client_spec.rb
http_utilities-1.1.5 spec/http_utilities/mechanize_client_spec.rb
http_utilities-1.1.2 spec/http_utilities/mechanize_client_spec.rb
http_utilities-1.1.1 spec/http_utilities/mechanize_client_spec.rb
http_utilities-1.1.0 spec/http_utilities/mechanize_client_spec.rb