Sha256: 83141d41a3be653939b30e9862205b36ad3b5f8826e286c1769fdd11fd490b6c
Contents?: true
Size: 853 Bytes
Versions: 4
Compression:
Stored size: 853 Bytes
Contents
require File.join(File.dirname(__FILE__), 'support', 'spec_helper') require 'albacore/ssh' require 'rake/sshtask' require 'fail_patch' describe "when running" do before :all do Net::SSH.stub_method(:start, &lambda{}).yields(@sshstub) end before :each do ssh :ssh do |t| t.extend(FailPatch) @yielded_object = t end Rake::Task[:ssh].invoke end it "should yield the ssh api" do @yielded_object.kind_of?(Ssh).should == true end end describe "when execution fails" do before :all do Net::SSH.stub_method(:start, &lambda{}).yields(@sshstub) end before :each do ssh :ssh_fail do |t| t.extend(FailPatch) t.fail end Rake::Task[:ssh_fail].invoke end it "should fail the rake task" do $task_failed.should be_true end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
albacore-0.1.5 | spec/sshtask_spec.rb |
albacore-0.1.4 | spec/sshtask_spec.rb |
albacore-0.1.3 | spec/sshtask_spec.rb |
albacore-0.1.2 | spec/sshtask_spec.rb |