Sha256: e1599eec884f385cafab4dfec25e47ccede28a5208444aba11ae6d93c0f5d9c1

Contents?: true

Size: 515 Bytes

Versions: 14

Compression:

Stored size: 515 Bytes

Contents

require "spec_helper"

describe FileUtils do
  describe "#mv" do
    let(:src) { "src" }
    let(:dest) { "dest" }
    let(:options) { {} }

    it "uses mv by default" do
      expect(FileUtils).to receive(:old_mv).with(src, dest, **options)
      FileUtils.mv(src, dest, options)
    end

    it "replaces mv with cp_r and rm_rf" do
      expect(FileUtils).to receive(:cp_r).with(src, dest, **options)
      expect(FileUtils).to receive(:rm_rf).with(src)

      FileUtils.mv(src, dest, options)
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
berkshelf-8.0.15 spec/unit/berkshelf/core_ext/file_utils_spec.rb
berkshelf-8.0.13 spec/unit/berkshelf/core_ext/file_utils_spec.rb
berkshelf-8.0.12 spec/unit/berkshelf/core_ext/file_utils_spec.rb
berkshelf-8.0.9 spec/unit/berkshelf/core_ext/file_utils_spec.rb
berkshelf-8.0.7 spec/unit/berkshelf/core_ext/file_utils_spec.rb
berkshelf-8.0.5 spec/unit/berkshelf/core_ext/file_utils_spec.rb
berkshelf-8.0.2 spec/unit/berkshelf/core_ext/file_utils_spec.rb
berkshelf-8.0.1 spec/unit/berkshelf/core_ext/file_utils_spec.rb
berkshelf-8.0.0 spec/unit/berkshelf/core_ext/file_utils_spec.rb
berkshelf-7.2.2 spec/unit/berkshelf/core_ext/file_utils_spec.rb
berkshelf-7.2.1 spec/unit/berkshelf/core_ext/file_utils_spec.rb
berkshelf-7.2.0 spec/unit/berkshelf/core_ext/file_utils_spec.rb
berkshelf-7.1.0 spec/unit/berkshelf/core_ext/file_utils_spec.rb
berkshelf-7.0.10 spec/unit/berkshelf/core_ext/file_utils_spec.rb