Sha256: 6569c4a5a35d883de0b43d6f61cbf83e83ddf2a669feb4bd711fe4635c1e0711

Contents?: true

Size: 811 Bytes

Versions: 16

Compression:

Stored size: 811 Bytes

Contents

require 'spec_helper'

describe 'create_command_class work correctly' do
  after do
    property[:os_by_host] = nil
  end

  context 'family: base, release: nil' do
    before do
      set :os, :family => 'base'
    end
    it { expect(Specinfra::Command::Base.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::Base.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::Base.create_command_class('file')).to eq Specinfra::Command::Redhat::V7::File }
  end
end








Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
specinfra-2.0.0.beta31 spec/command/base_spec.rb
specinfra-2.0.0.beta30 spec/command/base_spec.rb
specinfra-2.0.0.beta29 spec/command/base_spec.rb
specinfra-2.0.0.beta28 spec/command/base_spec.rb
specinfra-2.0.0.beta27 spec/command/base_spec.rb
specinfra-2.0.0.beta26 spec/command/base_spec.rb
specinfra-2.0.0.beta25 spec/command/base_spec.rb
specinfra-2.0.0.beta24 spec/command/base_spec.rb
specinfra-2.0.0.beta23 spec/command/base_spec.rb
specinfra-2.0.0.beta22 spec/command/base_spec.rb
specinfra-2.0.0.beta21 spec/command/base_spec.rb
specinfra-2.0.0.beta20 spec/command/base_spec.rb
specinfra-2.0.0.beta19 spec/command/base_spec.rb
specinfra-2.0.0.beta18 spec/command/base_spec.rb
specinfra-2.0.0.beta17 spec/command/base_spec.rb
specinfra-2.0.0.beta16 spec/command/base_spec.rb