Sha256: b06ac708caeaa521ff586598d7942c6a4e7d07e799bda0e5611ff76db5a0f905
Contents?: true
Size: 959 Bytes
Versions: 3
Compression:
Stored size: 959 Bytes
Contents
#!/usr/bin/env ruby require File.join(File.dirname(__FILE__), "..", "spec_helper") describe "Macro:" do before do create_web_project Glyph['document.output'] = 'web5' Glyph['document.extension'] = '.html' Glyph.run! 'load:all' end after do Glyph.lite_mode = false reset_quiet delete_project end it "section (topic)" do interpret("contents[section[@src[a/web1.glyph]@title[Test]]]") topic = @p.document.topics[0] topic[:contents].match(/<article>/).blank?.should == false end it "navigation" do Glyph.run! 'generate:web5' web1 = Glyph.file_load(Glyph::PROJECT/'output/web5/a/web1.html') web2 = Glyph.file_load(Glyph::PROJECT/'output/web5/a/b/web2.html') web1.match(%{<nav><a href="/index.html">Contents</a><a href="/a/b/web2.html">→ Topic #2</a></nav>}).blank?.should == false web2.match(%{<nav><a href="/a/web1.html">Topic #1 ←</a><a href="/index.html">Contents</a></nav>}).blank?.should == false end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
glyph-0.4.2 | spec/macros/web5_spec.rb |
glyph-0.4.1 | spec/macros/web5_spec.rb |
glyph-0.4.0 | spec/macros/web5_spec.rb |