Sha256: 1b361c6fc8798544d3dbbfad77fab809d0c865c5099aea4db45ff5398b14efaa

Contents?: true

Size: 511 Bytes

Versions: 28

Compression:

Stored size: 511 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

28 entries across 28 versions & 1 rubygems

Version Path
berkshelf-7.0.9 spec/unit/berkshelf/core_ext/file_utils_spec.rb
berkshelf-7.0.8 spec/unit/berkshelf/core_ext/file_utils_spec.rb
berkshelf-7.0.7 spec/unit/berkshelf/core_ext/file_utils_spec.rb
berkshelf-6.3.4 spec/unit/berkshelf/core_ext/file_utils_spec.rb
berkshelf-7.0.6 spec/unit/berkshelf/core_ext/file_utils_spec.rb
berkshelf-7.0.5 spec/unit/berkshelf/core_ext/file_utils_spec.rb
berkshelf-6.3.3 spec/unit/berkshelf/core_ext/file_utils_spec.rb
berkshelf-7.0.4 spec/unit/berkshelf/core_ext/file_utils_spec.rb
berkshelf-7.0.3 spec/unit/berkshelf/core_ext/file_utils_spec.rb
berkshelf-7.0.2 spec/unit/berkshelf/core_ext/file_utils_spec.rb
berkshelf-7.0.1 spec/unit/berkshelf/core_ext/file_utils_spec.rb
berkshelf-7.0.0 spec/unit/berkshelf/core_ext/file_utils_spec.rb
berkshelf-6.3.2 spec/unit/berkshelf/core_ext/file_utils_spec.rb
berkshelf-6.3.1 spec/unit/berkshelf/core_ext/file_utils_spec.rb
berkshelf-6.3.0 spec/unit/berkshelf/core_ext/file_utils_spec.rb
berkshelf-6.2.2 spec/unit/berkshelf/core_ext/file_utils_spec.rb
berkshelf-6.2.1 spec/unit/berkshelf/core_ext/file_utils_spec.rb
berkshelf-6.2.0 spec/unit/berkshelf/core_ext/file_utils_spec.rb
berkshelf-6.1.1 spec/unit/berkshelf/core_ext/file_utils_spec.rb
berkshelf-6.1.0 spec/unit/berkshelf/core_ext/file_utils_spec.rb