Sha256: b6839de7e0dcaf5a116b01f7dc4fea71b4be5a9eb72e91aba2a0982aa9038641

Contents?: true

Size: 675 Bytes

Versions: 13

Compression:

Stored size: 675 Bytes

Contents

require 'spec_helper'

module Maid
  describe UserAgent do
    describe 'the user agent string' do
      it 'is formatted with the Maid version, platform version, and Ruby version' do
        system = {
          'platform' => 'Unix',
          'platform_version' => '1.0',
          'languages' => {
            'ruby' => {
              'version' => '1.8.8',
              'platform' => 'pdp7',
            }
          }
        }

        system.stub(:all_plugins)

        Ohai::System.stub(:new) { system }
        ::Maid.stub(:const_get).with(:VERSION) { '0.0.1' }

        UserAgent.value.should == 'Maid/0.0.1 (Unix/1.0; Ruby/1.8.8 pdp7)'
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
maid-0.4.0.alpha.2 spec/lib/maid/user_agent_spec.rb
maid-0.4.0.alpha.1 spec/lib/maid/user_agent_spec.rb
maid-0.3.0 spec/lib/maid/user_agent_spec.rb
maid-0.3.0.beta.1 spec/lib/maid/user_agent_spec.rb
maid-0.2.3.alpha.1 spec/lib/maid/user_agent_spec.rb
maid-0.2.2 spec/lib/maid/user_agent_spec.rb
maid-0.2.2.beta.1 spec/lib/maid/user_agent_spec.rb
maid-0.2.1 spec/lib/maid/user_agent_spec.rb
maid-0.2.0 spec/lib/maid/user_agent_spec.rb
maid-0.2.0.rc.2 spec/lib/maid/user_agent_spec.rb
maid-0.2.0.rc.1 spec/lib/maid/user_agent_spec.rb
maid-0.2.0.beta.3 spec/lib/maid/user_agent_spec.rb
maid-0.2.0.beta.2 spec/lib/maid/user_agent_spec.rb