Sha256: 1ade6573cf49c49b79d7ba0c5be10344f36dfca536c6f0f37965bcafd0550f27

Contents?: true

Size: 1.38 KB

Versions: 6

Compression:

Stored size: 1.38 KB

Contents

describe RealZip do
  extend MyTemp.new(:temp, 'tmp/testing.zip')

  # describe '.new' do
  #   it 'takes file name and yaml string' do
  #     expect { RealZip temp, '{}' }.to change { File.exist? temp }.from(false).to(true)
  #   end

  #   it 'takes file name and hash' do
  #     expect { RealZip temp, {} }.to change { File.exist? temp }.from(false).to(true)
  #   end
    it 'displays the transferred file' do
      expect { RealZip temp, {} }.to change { File.open? temp }.from(false).to(true)
    end
  #   it 'recreates file if exist' do
  #     RealZip temp, {dir:[:file]}
  #     RealZip temp, {other:[:any]}
  #     zip_entries(temp).should == %w[ other/ other/any ]
  #   end
  # end

  # describe 'examples (given structure --- files in archive)' do
  #   examples = <<-END.lines.map(&:strip).map { |x| x.split(' --- ',2).map { |x| eval x } }
  #     "[]"       --- []
  #     {}         --- []
  #     {root: []} --- ['root/']
  #     "root: []" --- ['root/']
  #     'root_dir: [file1, file2, nested_dir: [nested_file.any], empty_dir: []]' ---  ["root_dir/", "root_dir/nested_dir/", "root_dir/empty_dir/", "root_dir/file1", "root_dir/file2", "root_dir/nested_dir/nested_file.any"] 
  #   END

  #   examples.each do |input,output|
  #     specify "#{input.inspect} --- #{output.inspect}" do
  #       RealZip temp, input
  #       zip_entries(temp).should == output
  #     end
  #   end
  # end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
real_zip-1.1.8 spec/examples_spec.rb
real_zip-1.1.7 spec/examples_spec.rb
real_zip-1.1.6 spec/examples_spec.rb
real_zip-1.0.1 spec/examples_spec.rb
real_zip-1.0.0 spec/examples_spec.rb
real_zip-0.2.0 spec/examples_spec.rb