Sha256: 2b8f51690764265bffa831d3069acf1cfeb8a37a298b5922b365c21c81e15c87

Contents?: true

Size: 804 Bytes

Versions: 15

Compression:

Stored size: 804 Bytes

Contents

require 'spec_helper'

describe 'create_command_class work correctly' do
  before do
    property[:os] = nil
  end

  context 'family: base, release: nil' do
    before do
      set :os, :family => 'base'
    end
    it { expect(Specinfra.command.send(:create_command_class, 'file')).to eq Specinfra::Command::Base::File }
  end

  context 'family: redhat, release: nil' do
    before do
      set :os, :family => 'redhat'
    end
    it { expect(Specinfra.command.send(:create_command_class, 'file')).to eq Specinfra::Command::Redhat::Base::File }
  end

  context 'family: redhat, release: 7' do
    before do
      set :os, :family => 'redhat', :release => 7
    end
    it { expect(Specinfra.command.send(:create_command_class, 'file')).to eq Specinfra::Command::Redhat::V7::File }
  end
end








Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
specinfra-2.0.0.beta47 spec/command/factory_spec.rb
specinfra-2.0.0.beta46 spec/command/factory_spec.rb
specinfra-2.0.0.beta45 spec/command/factory_spec.rb
specinfra-2.0.0.beta44 spec/command/factory_spec.rb
specinfra-2.0.0.beta43 spec/command/factory_spec.rb
specinfra-2.0.0.beta42 spec/command/factory_spec.rb
specinfra-2.0.0.beta41 spec/command/factory_spec.rb
specinfra-2.0.0.beta40 spec/command/factory_spec.rb
specinfra-2.0.0.beta39 spec/command/factory_spec.rb
specinfra-2.0.0.beta38 spec/command/factory_spec.rb
specinfra-2.0.0.beta37 spec/command/factory_spec.rb
specinfra-2.0.0.beta36 spec/command/factory_spec.rb
specinfra-2.0.0.beta35 spec/command/factory_spec.rb
specinfra-2.0.0.beta34 spec/command/factory_spec.rb
specinfra-2.0.0.beta33 spec/command/factory_spec.rb