Sha256: 36e65bac11b39f5f231336b905ce47101e416ee2e9d5b4bf04a4b7682fb01e9c
Contents?: true
Size: 969 Bytes
Versions: 1
Compression:
Stored size: 969 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper') require File.expand_path(File.dirname(__FILE__) + '/../../../../lib/sniffles/sniffers/analytics/google_analytics') describe Sniffles::Sniffers::GoogleAnalytics do describe "#output" do context "inline js", :vcr => { :cassette_name => "pearsonified_com" } do let(:ga) { described_class.new(page_body("http://www.pearsonified.com/")) } it { ga.output[:found].should eq true } it { ga.output[:ua].should eq "UA-2916092-1" } end context "inline w/ urchin", :vcr => { :cassette_name => "humemes_com" } do let(:ga) { described_class.new(page_body("http://humemes.com/")) } it { ga.output[:found].should eq true } it { ga.output[:ua].should eq "UA-386965-7" } end context "no google analytics" do let(:blank) { described_class.new(empty_html_doc) } it { blank.output[:found].should eq false } end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sniffles-0.1.2 | spec/sniffles/sniffers/analytics/google_analytics_spec.rb |