Sha256: d274d9a7ad565576cd2b43a3017600b5bbd58efeebd15fb976ebfd0f11647ddb

Contents?: true

Size: 689 Bytes

Versions: 42

Compression:

Stored size: 689 Bytes

Contents

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

describe HttpUtilities::Proxies::ProxySeeder do

  describe "when initialized" do
    before(:each) do
      @seeder = HttpUtilities::Proxies::ProxySeeder.new
    end
        
    it "should parse proxies from text files" do
      proxy_data = @seeder.parse_proxies
      proxy_data.should_not be_nil
    end
    
    #Can only be tested on mysql, sqlite will fail with ConstraintExceptions (since it does not support on duplicate key update ...)
    if (ENV['DB'] == 'mysql')
      it "should import parsed proxies using activerecord-import" do
        @seeder.seed
        ::Proxy.count.should > 0
      end
    end
    
  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

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