spec/task_spec.rb in screwcap-0.3.4 vs spec/task_spec.rb in screwcap-0.3.5

- old
+ new

@@ -27,11 +27,11 @@ it "should be able to execute statements on a remote server" do task = @deployer.__tasks.find {|t| t.name == :task1 } Runner.execute! task, @deployer.__options @stderr.size.should == 0 - @stdout.size.should == 26 + @stdout.size.should == 28 end it "should be able to use variables in the run statement" do task = @deployer.__tasks.find {|t| t.name == :task1 } command = task.__commands.map{|c| c[:command] }.find {|c| c.index "deploy dir" } @@ -76,7 +76,12 @@ deployer = Deployer.new(:recipe_file => "./test/config/expect.rb", :silent => true) t = deployer.__tasks.find {|t| t.__name == :expect } Runner.stubs(:ssh_exec!).returns(["","fail",1,nil]).then.returns(["ok","",0,nil]) Runner.execute! t, deployer.__options t.__commands.map {|c| [c[:command], c[:from]] }.first.should == ["echo 'we failed'", :failover] + end + + it "should be able to create local tasks" do + # TODO better testing on this + lambda { Deployer.new(:recipe_file => "./test/config/local_task.rb", :silent => true).run! :local }.should_not raise_error end end