Sha256: 8ec268fbcd90fb3f27c13d7d985a3f0db0ef0b0f0aa77e48038d566c9aa51883
Contents?: true
Size: 1.32 KB
Versions: 17
Compression:
Stored size: 1.32 KB
Contents
require File.dirname(__FILE__) + '/spec_helper.rb' require 'smallcage' describe "SmallCage::Commands::Export" do docroot = Pathname.new(File.dirname(__FILE__) + "/data/htdocs2") outdir = Pathname.new(File.dirname(__FILE__) + "/data/out") it "should export not smc files" do begin opts = { :command => "export", :path => docroot.to_s, :out => outdir.to_s, :quiet => true } SmallCage::Runner.run(opts) (outdir + "./a/test.html.smc").exist?.should_not be_true (outdir + "./a/test.html").exist?.should_not be_true (outdir + "./a/b/test.html").exist?.should be_true (outdir + "./a/b/c/test.html").exist?.should be_true ensure FileUtils.rm_r(outdir) end end it "should export project subdirectory" do begin path = docroot + "a/b/c" opts = { :command => "export", :path => path.to_s, :out => outdir.to_s, :quiet => true } SmallCage::Runner.run(opts) (outdir + "./a/test.html.smc").exist?.should_not be_true (outdir + "./a/test.html").exist?.should_not be_true (outdir + "./a/b/test.html").exist?.should_not be_true (outdir + "./a/b/c/test.html").exist?.should be_true ensure FileUtils.rm_r(outdir) end end end
Version data entries
17 entries across 17 versions & 2 rubygems