Sha256: c6179f5737f01b02a4e190c6c15daf3760702d83842a68d411e2dc1f28a080b6
Contents?: true
Size: 659 Bytes
Versions: 11
Compression:
Stored size: 659 Bytes
Contents
require 'fakefs/safe' require 'conjur/debify/utils' describe 'Conjur::Debify::Utils.copy_from_container' do it "copies a file from the container to the current directory" do tar = File.read "#{__dir__}/data/test.tar" container = instance_double Docker::Container allow(container).to receive(:copy).with "/tmp/test.tar" do |&b| StringIO.new(tar).each(nil, 512) do |c| # docker api sends three arguments, so emulate that b[c, nil, nil] end end FakeFS do Conjur::Debify::Utils.copy_from_container container, "/tmp/test.tar" expect(File.read 'test.txt').to eq "this is a test\n" end end end
Version data entries
11 entries across 11 versions & 1 rubygems