Sha256: 6f4922dad2c24c38d0e05b368c189062b1f60172cd022bf6383b4c0807a48813

Contents?: true

Size: 749 Bytes

Versions: 2

Compression:

Stored size: 749 Bytes

Contents

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

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

    context "w/o Mixpanel" do
      it "should return false" do
        Sniffles::Sniffers::Mixpanel.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/mixpanel_spec.rb
sniffles-0.1.0.1 spec/sniffles/sniffers/analytics/mixpanel_spec.rb