Sha256: 451f205bb821f02c6134e4672356d6f74bd3cce6002910221e75ca8a50bc8e58

Contents?: true

Size: 720 Bytes

Versions: 5

Compression:

Stored size: 720 Bytes

Contents

require File.join(File.dirname(__FILE__), 'support', 'spec_helper')
require 'albacore/zipdirectory'
require 'rake/ziptask'
require 'fail_patch'

describe "when running" do
  before :all do
    zip :zip do |t|
      t.extend(FailPatch)
      t.output_file = 'test.zip'
      @yielded_object = t
    end
    Rake::Task[:zip].invoke
  end
  
  it "should yield the zip api" do
    @yielded_object.kind_of?(ZipDirectory).should be_true
  end
end

describe "when execution fails" do
  before :all do
    zip :zip_fail do |t|
      t.extend(FailPatch)
      t.fail
    end
    Rake::Task[:zip_fail].invoke
  end
  
  it "should fail the rake task" do
    $task_failed.should == true
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
albacore-0.2.0.preview1 spec/ziptask_spec.rb
albacore-0.1.5 spec/ziptask_spec.rb
albacore-0.1.4 spec/ziptask_spec.rb
albacore-0.1.3 spec/ziptask_spec.rb
albacore-0.1.2 spec/ziptask_spec.rb