Sha256: 1fe20867731e429418cb1b803aa20d4dcf223dda9f68cf181cb5a63a31b13503

Contents?: true

Size: 858 Bytes

Versions: 2

Compression:

Stored size: 858 Bytes

Contents

#!/usr/bin/env ruby
require File.join(File.dirname(__FILE__), "..", "spec_helper")

describe "generate" do

	before do
		create_project
	end

	after do
		delete_project
	end

	it ":document should generate Glyph.document" do
		lambda { Glyph.run! 'generate:document'}.should_not raise_error
		Glyph.document.structure.children.length.should > 0
	end

	it ":html should generate a standalone html document" do
		lambda { Glyph.run! 'generate:html'}.should_not raise_error
		(Glyph::PROJECT/'output/html/test_project.html').exist?.should == true
	end

	it "should copy images" do
		dir = (Glyph::PROJECT/'images/test').mkpath
		file_copy Glyph::HOME/'spec/files/ligature.jpg', Glyph::PROJECT/'images/test' 
		lambda { Glyph.run! 'generate:html' }.should_not raise_error
		(Glyph::PROJECT/'output/html/images/test/ligature.jpg').exist?.should == true
	end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
glyph-0.3.0 spec/tasks/generate_spec.rb
glyph-0.2.0 spec/tasks/generate_spec.rb