Sha256: e68c69c0b267baf8e55a3a7eb8d04cd7eb98f1ecbc04e85e6f3f2c418f0c2d0a
Contents?: true
Size: 1.02 KB
Versions: 2
Compression:
Stored size: 1.02 KB
Contents
require File.dirname(__FILE__) + '/spec_helper.rb' require 'smallcage' describe "SmallCage::Commands::Manifest" do before do @docroot = Pathname.new(File.dirname(__FILE__) + "/data/htdocs1") @opts = { :path => @docroot.to_s } @manifest_file = @docroot + "Manifest.html" end it "should create Manifest.html" do SmallCage::Runner.run(@opts.merge(:command => "manifest")) @manifest_file.file?.should be_true source = @manifest_file.read source = source.match(%r{<ul class="files">\n(.+?)\n</ul>}m)[1].split(/\n/) contents = <<'EOT'.split(/\n/) <li><a href="./_dir.smc">./_dir.smc</a></li> <li><a href="./_smc/">./_smc/</a></li> <li><a href="./a/">./a/</a></li> <li><a href="./a/b/">./a/b/</a></li> <li><a href="./a/b/c/">./a/b/c/</a></li> <li><a href="./a/b/c/index.html.smc">./a/b/c/index.html.smc</a></li> EOT source.each do |line| contents.should include(line) end end after do SmallCage::Runner.run(@opts.merge(:command => "clean")) @manifest_file.delete end end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
bluemark-smallcage-0.1.4 | spec/manifest_spec.rb |
smallcage-0.1.4 | spec/manifest_spec.rb |