Sha256: 8b0a4d6657e129cd9e7a5487ffd5f4d4bf8c6ca6bb23395f086e5ad514eafea4
Contents?: true
Size: 1.09 KB
Versions: 42
Compression:
Stored size: 1.09 KB
Contents
require File.dirname(__FILE__) + '/../../spec_helper' describe Sprinkle::Installers::BsdPort do before do @package = mock(Sprinkle::Package, :name => 'package') end def create_port(ports, &block) Sprinkle::Installers::BsdPort.new(@package, ports, &block) end describe 'when created' do it 'should accept a single package to install' do @installer = create_port 'lang/ruby' @installer.port.should == 'lang/ruby' end end describe 'during installation' do before do @installer = create_port 'lang/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 =~ /cd \/usr\/ports\/lang\/ruby && make BATCH=yes install clean/ end it 'should automatically insert pre/post commands for the specified package' do @installer.send(:install_sequence).should == [ 'op1', 'sh -c \'cd /usr/ports/lang/ruby && make BATCH=yes install clean\'', 'op2' ] end end end
Version data entries
42 entries across 42 versions & 10 rubygems