spec/smallcage_spec.rb in smallcage-0.1.5 vs spec/smallcage_spec.rb in smallcage-0.1.6
- old
+ new
@@ -1,17 +1,16 @@
require File.dirname(__FILE__) + '/spec_helper.rb'
require 'smallcage'
describe "smallcage" do
- docroot = Pathname.new(File.dirname(__FILE__) + "/data/htdocs1")
-
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
@@ -33,8 +32,27 @@
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
end
\ No newline at end of file