Sha256: 5955e8f2e5301cf6c3d63541a94728470ef2576c31e76406ac4e7e83de80992a
Contents?: true
Size: 681 Bytes
Versions: 3
Compression:
Stored size: 681 Bytes
Contents
require 'assert' require 'cap-util/shared_path' require 'fileutils' require 'pathname' class CapUtil::SharedPath class UnitTests < Assert::Context desc "CapUtil::SharedPath" setup do @fake_cap = CapUtil::FakeCap.new @fake_cap.shared_path = Pathname.new File.expand_path("tmp/shared") @shared_path = CapUtil::SharedPath.new(@fake_cap) end subject{ @shared_path } should have_imeths :rm_rf should "remove a given relative path with the `rm_rf` method" do subject.rm_rf 'cached-copy' exp_cmd = "rm -rf #{File.expand_path("tmp/shared/cached-copy")}" assert_equal exp_cmd, @fake_cap.cmds_run.last end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
cap-util-1.5.2 | test/unit/shared_path_tests.rb |
cap-util-1.5.1 | test/unit/shared_path_tests.rb |
cap-util-1.5.0 | test/unit/shared_path_tests.rb |