Sha256: fda05fc8f92b7a377af86a4e39303c43652605786eb0193041644c71331f22da
Contents?: true
Size: 1.31 KB
Versions: 7
Compression:
Stored size: 1.31 KB
Contents
require 'spec_helper' describe Gondler::Package do let(:name) { 'github.com/golang/glog' } let(:options) { {} } let(:package) { described_class.new(name, options) } describe '#os' do let(:expected) { %w(linux darwin) } subject { package.os } context 'with ["linux", "darwin"]' do let(:options) { { :os => %w(linux darwin) } } it { should == expected } end context 'with "linux darwin"' do let(:options) { { :os => 'linux darwin' } } it { should == expected } end end describe '#installable?' do before { Gondler.env.os = 'darwin' } after { Gondler.env.reload! } subject { package.installable? } context 'when os option is nil' do it { should be_true } end context 'when os option is darwin' do let(:options) { { :os => 'darwin' } } it { should be_true } end context 'when os option is linux' do let(:options) { { :os => 'linux' } } it { should be_false } end context 'when os option is linux and darwin' do let(:options) { { :os => 'linux darwin' } } it { should be_true } end context 'when development without' do around {|e| Gondler.without(%w(development)) { e.run } } let(:options) { { :group => 'development' } } it { should be_false } end end end
Version data entries
7 entries across 7 versions & 1 rubygems