Sha256: 3f595a741faa20c243998549754c0168e082a5404eb93b2613c0fc5ee6407fac

Contents?: true

Size: 522 Bytes

Versions: 2

Compression:

Stored size: 522 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
      expect(proxies).to include(subject.proxy(name, site))
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
PageRankr-4.6.1 spec/proxy_services/random_spec.rb
PageRankr-4.6.0 spec/proxy_services/random_spec.rb