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-1.9.0 | spec/analytical/modules/comscore_spec.rb |