Sha256: 0b5f9ecac58be13be556dc7fa2b3c836e2c851796d861e4fa57deb497ada3c42
Contents?: true
Size: 1001 Bytes
Versions: 4
Compression:
Stored size: 1001 Bytes
Contents
require File.join(File.dirname(__FILE__), 'support', 'spec_helper') require 'albacore/plink' require 'rake/plinktask' require 'fail_patch' describe "when running" do before :all do plink :plink do |t| t.extend(FailPatch) @yielded_object = t end Rake::Task[:plink].invoke end it "should yield the command api" do @yielded_object.kind_of?(PLink).should == true end end describe "when execution fails" do before :all do plink :plink_fail do |t| t.extend(FailPatch) t.fail end Rake::Task[:plink_fail].invoke end it "should fail the rake task" do $task_failed.should be_true end end describe "when task args are used" do before :all do plink :plinktask_withargs, [:arg1] do |t, args| t.extend(FailPatch) @args = args end Rake::Task[:plinktask_withargs].invoke("test") end it "should provide the task args" do @args.arg1.should == "test" end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
albacore-0.1.5 | spec/plinktask_spec.rb |
albacore-0.1.4 | spec/plinktask_spec.rb |
albacore-0.1.3 | spec/plinktask_spec.rb |
albacore-0.1.2 | spec/plinktask_spec.rb |