Sha256: bb3228d718c2cf88df6b556442fc93d184962b15676f9640523b9e1a8fabd99e

Contents?: true

Size: 517 Bytes

Versions: 10

Compression:

Stored size: 517 Bytes

Contents

require 'spec_helper'

describe PageRankr::ProxyServices::Random do
  let(:proxies) do
    [
      "user:password@192.168.1.1:50501",
      "bob:smith@127.0.0.1:3000"
    ]
  end
  let(:site){PageRankr::Site("http://www.google.com")}
  let(:name){:ranks_google}
  subject{PageRankr::ProxyServices::Random.new(proxies)}

  it{should respond_to(:proxy).with(2).arguments}

  it "should return a proxy from the list of proxies" do
    10.times do
      proxies.should include(subject.proxy(name, site))
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
PageRankr-4.4.1 spec/proxy_services/random_spec.rb
PageRankr-4.4.0 spec/proxy_services/random_spec.rb
PageRankr-4.3.0 spec/proxy_services/random_spec.rb
PageRankr-4.2.1 spec/proxy_services/random_spec.rb
PageRankr-4.2.0 spec/proxy_services/random_spec.rb
PageRankr-4.1.1 spec/proxy_services/random_spec.rb
PageRankr-4.1.0 spec/proxy_services/random_spec.rb
PageRankr-4.0.0 spec/proxy_services/random_spec.rb
PageRankr-3.2.1 spec/proxy_services/random_spec.rb
PageRankr-3.2.0 spec/proxy_services/random_spec.rb