Sha256: 1a89d8ea18bd8ff5ada0620f31ad9350d0a9671db9d81cd183d364a3525ad18c

Contents?: true

Size: 767 Bytes

Versions: 2

Compression:

Stored size: 767 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper')
require File.expand_path(File.dirname(__FILE__) + '/../../../../lib/sniffles/sniffers/analytics/quantcast')

describe Sniffles::Sniffers::Quantcast do
  describe "#output" do
    context "w/ Quantcast", :vcr do
      before(:all) do
        @squidoo = Typhoeus::Request.get("http://www.squidoo.com").body
      end
      
      it "should return true for found" do
        Sniffles::Sniffers::Quantcast.new(@squidoo).output[:found].should eq true
      end
    end
    

    context "w/o Quantcast" do
      it "should return false" do
        Sniffles::Sniffers::Quantcast.new("<html><head></head><body>No analytics!</body></html>").output[:found].should eq false
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sniffles-0.1.1 spec/sniffles/sniffers/analytics/quantcast_spec.rb
sniffles-0.1.0.1 spec/sniffles/sniffers/analytics/quantcast_spec.rb