Sha256: 10c0cae318f99a5f4a0bd96e60c1e743b1ff2e4399751f68d72151fce78b996a

Contents?: true

Size: 1.26 KB

Versions: 60

Compression:

Stored size: 1.26 KB

Contents

require File.dirname(__FILE__) + '/../../spec_helper'

describe Sprinkle::Installers::Rpm do

  before do
    @package = mock(Sprinkle::Package, :name => 'package')
  end

  def create_rpm(debs, &block)
    Sprinkle::Installers::Rpm.new(@package, debs, &block)
  end

  describe 'when created' do

    it 'should accept a single package to install' do
      @installer = create_rpm 'ruby'
      @installer.packages.should == [ 'ruby' ]
    end

    it 'should accept an array of packages to install' do
      @installer = create_rpm %w( gcc gdb g++ )
      @installer.packages.should == ['gcc', 'gdb', 'g++']
    end

  end

  describe 'during installation' do

    before do
      @installer = create_rpm 'ruby' do
        pre :install, 'op1'
        post :install, 'op2'
      end
      @install_commands = @installer.send :install_commands
    end

    it 'should invoke the rpm installer for all specified packages' do
      @install_commands.should =~ /rpm -Uvh ruby/
    end

    it 'should automatically insert pre/post commands for the specified package' do
      @installer.send(:install_sequence).should == [ 'op1', 'rpm -Uvh ruby', 'op2' ]
    end

    it 'should specify a non interactive mode to the apt installer'
    it 'should install a specific version if defined'

  end

end

Version data entries

60 entries across 60 versions & 13 rubygems

Version Path
lachlan-sprinkle-0.0.10 spec/sprinkle/installers/rpm_spec.rb
lachlan-sprinkle-0.0.11 spec/sprinkle/installers/rpm_spec.rb
lachlan-sprinkle-0.0.13 spec/sprinkle/installers/rpm_spec.rb
lachlan-sprinkle-0.0.14 spec/sprinkle/installers/rpm_spec.rb
lachlan-sprinkle-0.0.15 spec/sprinkle/installers/rpm_spec.rb
lachlan-sprinkle-0.0.16 spec/sprinkle/installers/rpm_spec.rb
lachlan-sprinkle-0.0.2 spec/sprinkle/installers/rpm_spec.rb
lachlan-sprinkle-0.0.3 spec/sprinkle/installers/rpm_spec.rb
lachlan-sprinkle-0.0.4 spec/sprinkle/installers/rpm_spec.rb
lachlan-sprinkle-0.0.5 spec/sprinkle/installers/rpm_spec.rb
lachlan-sprinkle-0.0.6 spec/sprinkle/installers/rpm_spec.rb
lachlan-sprinkle-0.0.7 spec/sprinkle/installers/rpm_spec.rb
lachlan-sprinkle-0.0.8 spec/sprinkle/installers/rpm_spec.rb
lachlan-sprinkle-0.0.9 spec/sprinkle/installers/rpm_spec.rb
mdwan-sprinkle-0.2.2 spec/sprinkle/installers/rpm_spec.rb
mdwan-sprinkle-0.2.3 spec/sprinkle/installers/rpm_spec.rb
mitchellh-sprinkle-0.1.5 spec/sprinkle/installers/rpm_spec.rb
mitchellh-sprinkle-0.1.6 spec/sprinkle/installers/rpm_spec.rb
trevorturk-sprinkle-0.2.2 spec/sprinkle/installers/rpm_spec.rb
trevorturk-sprinkle-0.2.6 spec/sprinkle/installers/rpm_spec.rb