Sha256: c42136dee89b4b91e31eed77ae0029cce764bdbcaa8ab9c50598bbc5e6a2990c
Contents?: true
Size: 1.25 KB
Versions: 10
Compression:
Stored size: 1.25 KB
Contents
require 'spec_helper' module Omnibus describe Compressor do describe '.for_current_system' do context 'on Mac OS X' do before { stub_ohai(platform: 'mac_os_x', version: '10.9.2') } context 'when :dmg is activated' do it 'prefers dmg' do expect(described_class.for_current_system([:tgz, :dmg])).to eq(Compressor::DMG) end end context 'when :dmg is not activated' do it 'prefers tgz' do expect(described_class.for_current_system([:tgz, :foo])).to eq(Compressor::TGZ) end end context 'when nothing is given' do it 'returns null' do expect(described_class.for_current_system([])).to eq(Compressor::Null) end end end context 'on Ubuntu' do before { stub_ohai(platform: 'ubuntu', version: '14.04') } context 'when :tgz activated' do it 'prefers tgz' do expect(described_class.for_current_system([:tgz, :foo])).to eq(Compressor::TGZ) end end context 'when nothing is given' do it 'returns null' do expect(described_class.for_current_system([])).to eq(Compressor::Null) end end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems