Sha256: a15ac371f5db33f2c752ac63497d20161e4514e71d2cc1caf1163268c2041cca
Contents?: true
Size: 1.21 KB
Versions: 11
Compression:
Stored size: 1.21 KB
Contents
require File.expand_path("../../spec_helper", File.dirname(__FILE__)) describe Sprinkle::Actors::Local do before do @local = Sprinkle::Actors::Local.new @package = Package.new("super") {} end describe 'when installing' do before do @installer = Sprinkle::Installers::Runner.new(@package, "echo hi") @commands = %w( op1 op2 ) @roles = %w( app ) @name = 'name' @local.stub!(:run_command).and_return(0) end it 'should run the commands on the local system' do @local.should_receive(:run_command).once.and_return(0) @local.install @installer, @roles end end describe 'when verifying' do before do @verifier = Sprinkle::Verify::new(@package) {} @verifier.commands += ["test","test"] @roles = %w( app ) @name = 'name' end it 'should return false when verification fails' do @local.stub!(:run_command).and_return(1) res = @local.verify @verifier, @roles res.should == false end it 'should run the commands on the local system' do @local.stub!(:run_command).and_return(0) res = @local.verify @verifier, @roles res.should == true end end end
Version data entries
11 entries across 11 versions & 1 rubygems