spec/pa/cmd_spec.rb in pa-1.0.0 vs spec/pa/cmd_spec.rb in pa-1.0.1

- old
+ new

@@ -1,17 +1,13 @@ require "spec_helper" require "fileutils" require "tmpdir" -describe Pa do - it "a" do - Pa._copy 'a','b' - end +module Pa::ClassMethods::Cmd + public :_copy, :_touch, :_mkdir, :_mktmpname, :_rmdir, :_copy, :_move end - -=begin describe Pa do before :all do @curdir = Dir.pwd @tmpdir = Dir.mktmpdir Dir.chdir(@tmpdir) @@ -85,12 +81,10 @@ Pa.rm_r "dir" File.exists?("dir").should be_false end end - - describe "#rm_if" do it "remove if condition" do Pa.rm_if "." do |pa| next if pa.p=="a" yield if pa.b=="a" @@ -185,11 +179,12 @@ end end it "_copy with :normal" do Pa._copy 'dir', 'dir_normal', special: true - Dir.empty?('dir_normal').should be_true + dir_empty = (Dir.entries('dir_normal').length==2) + dir_empty.should be_true end end describe "#cp" do @@ -273,6 +268,5 @@ File.exists?("dir/b").should be_true end end end -=end