Sha256: 16b364f70eb1a13fa04fa142bbec5b26e48e6863b18eae888e5aeef40ee21f7a

Contents?: true

Size: 806 Bytes

Versions: 6

Compression:

Stored size: 806 Bytes

Contents

require_relative '../../test_helper'
require 'fileutils'

describe AgileUtils do

  context '#tar_gzip_files' do
    before do
      FileUtils.rm_rf("test/fixtures/output.tar.gz")
      @files = AgileUtils::FileUtil.find("test/fixtures/outputs", 'xhtml')
    end

    after do
      FileUtils.rm_rf("test/fixtures/output.tar.gz")
    end

    it 'compresses list of files' do
      refute File.exists?("test/fixtures/output.tar.gz"), "Output file must not exist"
      AgileUtils::FileUtil.tar_gzip_files(@files, "test/fixtures/output.tar.gz")
      assert File.exists?("test/fixtures/output.tar.gz"), "Output file must be generated"
    end
  end

  # context '#delete' do
  #   it 'removes the files' do
  #     @files.wont_be_empty
  #     AgileUtils::FileUtil.delete(@files)
  #
  #   end
  # end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
agile_utils-0.0.8 test/lib/agile_utils/test_file_util.rb
agile_utils-0.0.7 test/lib/agile_utils/test_file_util.rb
agile_utils-0.0.6 test/lib/agile_utils/test_file_util.rb
agile_utils-0.0.5 test/lib/agile_utils/test_file_util.rb
agile_utils-0.0.4 test/lib/agile_utils/test_file_util.rb
agile_utils-0.0.2 test/lib/agile_utils/test_file_util.rb