spec/smallcage_spec.rb in smallcage-0.1.7 vs spec/smallcage_spec.rb in smallcage-0.1.8

- old
+ new

@@ -5,81 +5,6 @@ it "show version" do # puts "------- version:" + SmallCage::VERSION::STRING end - it "should update not docroot directory" do - docroot = Pathname.new(File.dirname(__FILE__) + "/data/htdocs1") - path = docroot + "a/b/" - - opts = { :command => "update", :path => path.to_s, :quiet => true } - - begin - SmallCage::Runner.run(opts) - - out = docroot + "a/b/c/index.html" - out.file?.should be_true - out.delete - - pwd = Dir.pwd - Dir.chdir(path) - - opts[:path] = "." - SmallCage::Runner.run(opts) - - Dir.chdir(pwd) - - out.file?.should be_true - out.delete - ensure - SmallCage::Runner.run({:command => "clean", :path => path.to_s, :quiet => true }) - end - - end - - it "should not publish _dir.smc and _local.smc" do - root = Pathname.new(File.dirname(__FILE__) + "/data/htdocs3") - - opts = { :command => "update", :path => root.to_s, :quiet => true } - - begin - SmallCage::Runner.run(opts) - - out = root + "_dir" - out.file?.should be_false - - out = root + "_local" - out.file?.should be_false - ensure - SmallCage::Runner.run({:command => "clean", :path => root.to_s, :quiet => true }) - end - - end - - # http://github.com/bluemark/smallcage/issues/#issue/2 - it "should not delete files under the common prefix directory" do - root = Pathname.new(File.dirname(__FILE__) + "/data/htdocs3") - begin - SmallCage::Runner.run({ :command => "update", :path => root.to_s, :quiet => true }) - - (root + "a/index.html").file?.should be_true - (root + "ab/index.html").file?.should be_true - (root + "abc/index.html").file?.should be_true - - SmallCage::Runner.run({ :command => "update", :path => (root + "a").to_s, :quiet => true }) - - (root + "a/index.html").file?.should be_true - (root + "ab/index.html").file?.should be_true - (root + "abc/index.html").file?.should be_true - - SmallCage::Runner.run({ :command => "update", :path => (root + "ab").to_s, :quiet => true }) - - (root + "a/index.html").file?.should be_true - (root + "ab/index.html").file?.should be_true - (root + "abc/index.html").file?.should be_true - ensure - SmallCage::Runner.run({:command => "clean", :path => root.to_s, :quiet => true }) - end - - end - -end \ No newline at end of file +end