Sha256: 61b294939dcac9df9695c125f64a13b1cabfc41abab55e5f2e31737b338c8d8f
Contents?: true
Size: 922 Bytes
Versions: 11
Compression:
Stored size: 922 Bytes
Contents
# encoding: utf-8 require 'rake' require 'test/unit' require 'rake/common/ziptask' require 'rake/helpers/unittest' class TestZipTask < Test::Unit::TestCase private public def setup @rake_task = Rake::Task.new('some-task-' + name, Rake.application) @zip = __FILE__.pathmap('%X.zip') File.unlink(@zip) if File.exists?(@zip) end def test_zip_no_filename assert_raise RuntimeError do # second argument must be non-empty Rake::Delphi::ZipTask.new(@rake_task, nil, nil) end end def test_zip_empty_filename assert_raise RuntimeError do # second argument must be non-empty Rake::Delphi::ZipTask.new(@rake_task, '', nil) end end def test_zip_file Rake::Delphi::ZipTask.new(@rake_task, @zip, [__FILE__]) assert(File.exists?(@zip)) end end
Version data entries
11 entries across 11 versions & 1 rubygems