Sha256: d42e5a5ad4b1549de63b02f97fcf16c1b19a103a862786e7b7408a86f625f1ea

Contents?: true

Size: 1.05 KB

Versions: 21

Compression:

Stored size: 1.05 KB

Contents

require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')

describe "Analytical::Modules::Comscore" do
  before(:each) do
    @parent = mock('api', :options=>{:comscore=>{:key=>123}})
  end
  describe 'on initialize' do
    it 'should set the command_location' do
      a = Analytical::Modules::Comscore.new :parent=>@parent, :key=>123
      a.tracking_command_location.should == :head_append
    end
    it 'should set the options' do
      a = Analytical::Modules::Comscore.new :parent=>@parent, :key=>1234
      a.options.should == {:key=>1234, :parent=>@parent}
    end
  end
  describe '#init_javascript' do
    it 'should return the init javascript' do
      @api = Analytical::Modules::Comscore.new :parent=>@parent, :key=>1234
      @api.init_javascript(:head_prepend).should == ''
      @api.init_javascript(:head_append).should =~ /scorecardresearch.com\/beacon.js/
      @api.init_javascript(:head_append).should =~ /1234/
      @api.init_javascript(:body_prepend).should == ''
      @api.init_javascript(:body_append).should == ''
    end
  end
end

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
analytical-3.0.8 spec/analytical/modules/comscore_spec.rb
analytical-3.0.7 spec/analytical/modules/comscore_spec.rb
analytical-3.0.6 spec/analytical/modules/comscore_spec.rb
gsiener-analytical-2.10.2 spec/analytical/modules/comscore_spec.rb
gsiener-analytical-2.10.1 spec/analytical/modules/comscore_spec.rb
analytical-2.11.0 spec/analytical/modules/comscore_spec.rb
analytical-2.10.0 spec/analytical/modules/comscore_spec.rb
gsiener-analytical-2.10.0 spec/analytical/modules/comscore_spec.rb
analytical-2.9.0 spec/analytical/modules/comscore_spec.rb
analytical-2.8.0 spec/analytical/modules/comscore_spec.rb
analytical-2.7.2 spec/analytical/modules/comscore_spec.rb
analytical-2.7.1 spec/analytical/modules/comscore_spec.rb
analytical-2.7.0 spec/analytical/modules/comscore_spec.rb
analytical-2.6.0 spec/analytical/modules/comscore_spec.rb
analytical-2.5.0 spec/analytical/modules/comscore_spec.rb
analytical-2.4.0 spec/analytical/modules/comscore_spec.rb
analytical-2.3.0 spec/analytical/modules/comscore_spec.rb
analytical-2.2.0 spec/analytical/modules/comscore_spec.rb
analytical-2.1.0 spec/analytical/modules/comscore_spec.rb
analytical-2.0.0 spec/analytical/modules/comscore_spec.rb