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

Version Path
bluemark-smallcage-0.1.3 spec/export_spec.rb
bluemark-smallcage-0.1.4 spec/export_spec.rb
bluemark-smallcage-0.1.5 spec/export_spec.rb
smallcage-0.2.2 spec/export_spec.rb
smallcage-0.2.1 spec/export_spec.rb
smallcage-0.2.0 spec/export_spec.rb
smallcage-0.1.9 spec/export_spec.rb
smallcage-0.1.8 spec/export_spec.rb
smallcage-0.1.7 spec/export_spec.rb
smallcage-0.1.6 spec/export_spec.rb
smallcage-0.1.5 spec/export_spec.rb
smallcage-0.1.4 spec/export_spec.rb
smallcage-0.1.3 spec/export_spec.rb
smallcage-0.0.9 spec/export_spec.rb
smallcage-0.1.0 spec/export_spec.rb
smallcage-0.1.2 spec/export_spec.rb
smallcage-0.1.1 spec/export_spec.rb