diff options
| -rw-r--r-- | Library/Homebrew/extend/pathname.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/test/test_pathname.rb | 19 | 
2 files changed, 2 insertions, 19 deletions
diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb index 16287c23a..84b65857f 100644 --- a/Library/Homebrew/extend/pathname.rb +++ b/Library/Homebrew/extend/pathname.rb @@ -132,6 +132,7 @@ class Pathname    private :default_stat    def cp dst +    opoo "Pathname#cp is deprecated, use FileUtils.cp"      if file?        FileUtils.cp to_s, dst      else @@ -194,6 +195,7 @@ class Pathname    end    def chmod_R perms +    opoo "Pathname#chmod_R is deprecated, use FileUtils.chmod_R"      require 'fileutils'      FileUtils.chmod_R perms, to_s    end diff --git a/Library/Homebrew/test/test_pathname.rb b/Library/Homebrew/test/test_pathname.rb index 3bfda1a17..1c0fdfa41 100644 --- a/Library/Homebrew/test/test_pathname.rb +++ b/Library/Homebrew/test/test_pathname.rb @@ -46,12 +46,6 @@ class PathnameExtensionTests < Test::Unit::TestCase      assert_raises(RuntimeError) { @file.write('CONTENT') }    end -  def test_chmod_R -    perms = 0777 -    FileUtils.expects(:chmod_R).with(perms, @dir.to_s) -    @dir.chmod_R(perms) -  end -    def test_atomic_write      touch @file      @file.atomic_write('CONTENT') @@ -71,19 +65,6 @@ class PathnameExtensionTests < Test::Unit::TestCase      assert_equal sentinel.stat.mode, @file.stat.mode    end -  def test_cp -    touch @file -    mkdir_p @dir - -    @file.cp(@dir) -    assert @file.file? -    assert((@dir+@file.basename).file?) - -    @dir.cp(@dst) -    assert @dir.directory? -    assert((@dst+@dir.basename).directory?) -  end -    def test_ensure_writable      touch @file      chmod 0555, @file  | 
