Sha256: d7bfebc41851bd8c4a1b720a85ed70cddbffe2849c989bfccaf23894a010e1d0

Contents?: true

Size: 888 Bytes

Versions: 14

Compression:

Stored size: 888 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
  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

14 entries across 14 versions & 1 rubygems

Version Path
http_utilities-1.4.3 spec/http_utilities/mechanize_client_spec.rb
http_utilities-1.4.2 spec/http_utilities/mechanize_client_spec.rb
http_utilities-1.4.1 spec/http_utilities/mechanize_client_spec.rb
http_utilities-1.4.0 spec/http_utilities/mechanize_client_spec.rb
http_utilities-1.3.9 spec/http_utilities/mechanize_client_spec.rb
http_utilities-1.3.8 spec/http_utilities/mechanize_client_spec.rb
http_utilities-1.3.7 spec/http_utilities/mechanize_client_spec.rb
http_utilities-1.3.6 spec/http_utilities/mechanize_client_spec.rb
http_utilities-1.3.5 spec/http_utilities/mechanize_client_spec.rb
http_utilities-1.3.4 spec/http_utilities/mechanize_client_spec.rb
http_utilities-1.3.3 spec/http_utilities/mechanize_client_spec.rb
http_utilities-1.3.2 spec/http_utilities/mechanize_client_spec.rb
http_utilities-1.3.1 spec/http_utilities/mechanize_client_spec.rb
http_utilities-1.3.0 spec/http_utilities/mechanize_client_spec.rb