Sha256: 1096ecf04dc58305aaaa47644f5746b3a44061c96ba21c1d2ab84ddf4a69d597
Contents?: true
Size: 1.16 KB
Versions: 6
Compression:
Stored size: 1.16 KB
Contents
require 'spec_helper.rb' require 'smallcage' require 'smallcage/commands/manifest' describe SmallCage::Commands::Manifest do before do @docroot = Pathname.new(File.join(SPEC_DATA_DIR, '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="./_smc/filters/">./_smc/filters/</a></li> <li><a href="./_smc/filters/filters.yml">./_smc/filters/filters.yml</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", :quiet => true)) @manifest_file.delete end end
Version data entries
6 entries across 6 versions & 1 rubygems