Sha256: cef0d8940c0d34b47f27225f53cad29e1153d54023a0c6bf71254d533d5a5631

Contents?: true

Size: 671 Bytes

Versions: 4

Compression:

Stored size: 671 Bytes

Contents

require 'spec_helper'

module Maid
  describe UserAgent do
    before do
      allow(::Maid).to receive(:const_get).with(:VERSION).and_return('0.0.1')
      stub_const('RUBY_DESCRIPTION', 'ruby 1.8.8p0 (1970-01-01 revision 1) [pdp7-unix]')
    end

    describe 'the user agent string' do
      it 'is formatted with the Maid version, platform version, and Ruby version' do
        expect(UserAgent.value).to eq('Maid/0.0.1 (ruby 1.8.8p0 (1970-01-01 revision 1) [pdp7-unix])')
      end
    end

    describe 'the short user agent string' do
      it 'is formatted with the Maid version' do
        expect(UserAgent.short).to eq('Maid/0.0.1')
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
maid-0.10.0 spec/lib/maid/user_agent_spec.rb
maid-0.10.0.pre.alpha.3 spec/lib/maid/user_agent_spec.rb
maid-0.10.0.pre.alpha.2 spec/lib/maid/user_agent_spec.rb
maid-0.10.0.pre.alpha.1 spec/lib/maid/user_agent_spec.rb