#!/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("section[section[@src[a/web1.glyph]@title[Test]]]") topic = @p.document.topics[0] expect(topic[:contents].match(/
/).blank?).to eq(false) end it "navigation" do Glyph.run! 'generate:web5' web1 = Glyph.file_load(Glyph::PROJECT/'output/web5/a/web1.html').gsub(/\n|\t| /, '') web2 = Glyph.file_load(Glyph::PROJECT/'output/web5/a/b/web2.html').gsub(/\n|\t| /, '') expect(web1).to match(%{}) expect(web2).to match(%{}) end end