Sha256: 2d312922f07c73b205dd8253d64e6961921c67e07f5af9e038e24882add4cf78

Contents?: true

Size: 640 Bytes

Versions: 2

Compression:

Stored size: 640 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

2 entries across 2 versions & 1 rubygems

Version Path
maid-0.2.0.beta.1 spec/lib/maid/user_agent_spec.rb
maid-0.2.0.alpha.1 spec/lib/maid/user_agent_spec.rb