Sha256: fbc2b809ceff2e8c829fe58033129f86065895b33b8796caf0924d0cbec6b454

Contents?: true

Size: 1012 Bytes

Versions: 42

Compression:

Stored size: 1012 Bytes

Contents

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

describe Sprinkle::Installers::MacPort do

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

  def create_port(ports, &block)
    Sprinkle::Installers::MacPort.new(@package, ports, &block)
  end

  describe 'when created' do

    it 'should accept a single package to install' do
      @installer = create_port 'ruby'
      @installer.port.should == 'ruby'
    end

  end

  describe 'during installation' do

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

    it 'should invoke the port installer for all specified packages' do
      @install_commands.should =~ /port install ruby/
    end

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

  end

end

Version data entries

42 entries across 42 versions & 10 rubygems

Version Path
crafterm-sprinkle-0.2.1 spec/sprinkle/installers/mac_port_spec.rb
crafterm-sprinkle-0.2.2 spec/sprinkle/installers/mac_port_spec.rb
crafterm-sprinkle-0.2.3 spec/sprinkle/installers/mac_port_spec.rb
crafterm-sprinkle-0.2.4 spec/sprinkle/installers/mac_port_spec.rb
crafterm-sprinkle-0.2.5 spec/sprinkle/installers/mac_port_spec.rb
crafterm-sprinkle-0.2.6 spec/sprinkle/installers/mac_port_spec.rb
jemmyw-sprinkle-0.2.3 spec/sprinkle/installers/mac_port_spec.rb
jemmyw-sprinkle-0.2.4 spec/sprinkle/installers/mac_port_spec.rb
justsee-sprinkle-0.2.4 spec/sprinkle/installers/mac_port_spec.rb
lachlan-sprinkle-0.0.1 spec/sprinkle/installers/mac_port_spec.rb
lachlan-sprinkle-0.0.10 spec/sprinkle/installers/mac_port_spec.rb
lachlan-sprinkle-0.0.11 spec/sprinkle/installers/mac_port_spec.rb
lachlan-sprinkle-0.0.13 spec/sprinkle/installers/mac_port_spec.rb
lachlan-sprinkle-0.0.14 spec/sprinkle/installers/mac_port_spec.rb
lachlan-sprinkle-0.0.15 spec/sprinkle/installers/mac_port_spec.rb
lachlan-sprinkle-0.0.16 spec/sprinkle/installers/mac_port_spec.rb
lachlan-sprinkle-0.0.2 spec/sprinkle/installers/mac_port_spec.rb
lachlan-sprinkle-0.0.3 spec/sprinkle/installers/mac_port_spec.rb
lachlan-sprinkle-0.0.4 spec/sprinkle/installers/mac_port_spec.rb
lachlan-sprinkle-0.0.5 spec/sprinkle/installers/mac_port_spec.rb