Sha256: 70fd618ff112551129255665a5fe47a57938109cfb8f16550b6bccb1bf3224a8

Contents?: true

Size: 1.01 KB

Versions: 6

Compression:

Stored size: 1.01 KB

Contents

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

describe "Analytical::Modules::Reinvigorate" do

  before(:each) do
    @parent = mock('api', :options=>{:reinvigorate=>{:key=>'abc'}})
  end

  describe 'on initialize' do

    it 'should set the command_location' do
      a = Analytical::Modules::Reinvigorate.new :parent=>@parent, :key=>'abc'
      a.tracking_command_location.should == :body_append
    end

    it 'should set the options' do
      a = Analytical::Modules::Reinvigorate.new :parent=>@parent, :key=>'abc'
      a.options.should == {:key=>'abc', :parent=>@parent}
    end

  end

  describe '#init_javascript' do

    it 'should return the init javascript' do
      @api = Analytical::Modules::Reinvigorate.new :parent=>@parent, :key=>'abcdef'
      @api.init_javascript(:head_prepend).should == ''
      @api.init_javascript(:head_append).should == ''
      @api.init_javascript(:body_prepend).should == ''
      @api.init_javascript(:body_append).should =~ /reinvigorate/
    end

  end

end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
analytical-3.0.8 spec/analytical/modules/reinvigorate_spec.rb
analytical-3.0.7 spec/analytical/modules/reinvigorate_spec.rb
analytical-3.0.6 spec/analytical/modules/reinvigorate_spec.rb
gsiener-analytical-2.10.2 spec/analytical/modules/reinvigorate_spec.rb
gsiener-analytical-2.10.1 spec/analytical/modules/reinvigorate_spec.rb
gsiener-analytical-2.10.0 spec/analytical/modules/reinvigorate_spec.rb