Sha256: 153a9fa71ee124e21153890461d36b4e51a2d5fe649023b14259c6619cc86f96
Contents?: true
Size: 1.52 KB
Versions: 17
Compression:
Stored size: 1.52 KB
Contents
# Copyright (C) 2011 RightScale, Inc, All Rights Reserved Worldwide. # # THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE # AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use, # reproduction, modification, or disclosure of this program is # strictly prohibited. Any use of this program by an authorized # licensee is strictly subject to the terms and conditions, # including confidentiality obligations, set forth in the applicable # License Agreement between RightScale.com, Inc. and # the licensee require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper')) describe RightConf::PackagesConfigurator do def success_result(output=nil) flexmock('res', :success? => true, :output => output) end before(:each) do lang = RightConf::Language.parse('packages { debian %w(deb1 deb2); centos %w(cent1 cent2) }') @configurator = lang.configurators.first [:report_check, :report_result, :report_fatal, :report_success].each do |meth| flexmock(@configurator).should_receive(meth) end end it 'should install packages on Ubuntu' do flexmock(RightConf::Command.instance).should_receive(:execute).once.with( 'sudo', 'apt-get', 'install', '-y', 'deb1', 'deb2').and_return(success_result) @configurator.run_linux_ubuntu end it 'should install packages on Centos' do flexmock(RightConf::Command.instance).should_receive(:execute).once.with( 'sudo', 'yum', 'install', '-y', 'cent1', 'cent2').and_return(success_result) @configurator.run_linux_centos end end
Version data entries
17 entries across 17 versions & 1 rubygems