test/buildmaster/site/tc_file_processor.rb in BuildMaster-1.0.9 vs test/buildmaster/site/tc_file_processor.rb in BuildMaster-1.1.9

- old
+ new

@@ -9,26 +9,25 @@ require 'cotta/in_memory_system' module BuildMaster -context 'File Processor' do - setup do +describe 'File Processor' do + before do @cotta = Cotta.new(InMemorySystem.new) - @cotta.file('content').save(<<CONTENT + @cotta.file('content').save <<CONTENT line one line two line three CONTENT -) end - teardown do + after do @cotta = nil end - specify 'should know content and target' do + it 'should know content and target' do content = <<CONTENT <html xmlns="http://www.w3.org/1999/xhtml" xmlns:template="http://buildmaster.rubyforge.org/xtemplate/1.0"> </html> CONTENT @@ -39,11 +38,11 @@ processor = FileProcessor.new(template, @cotta.file('content/index.html'), site_spec) processor.content_file.path.should ==(Pathname.new('content/index.html')) processor.is_html?.should ==(true) end - specify 'should copy the content if no content engine found' do + it 'should copy the content if no content engine found' do content = <<CONTENT <html xmlns="http://www.w3.org/1999/xhtml" xmlns:template="http://buildmaster.rubyforge.org/xtemplate/1.0"> </html> CONTENT @@ -67,11 +66,11 @@ def relative_to_root(path) return Pathname.new('tmp') end - specify 'should have support for markdown content' do + it 'should have support for markdown content' do template_content = <<CONTENT <html xmlns="http://www.w3.org/1999/xhtml" xmlns:template="http://buildmaster.rubyforge.org/xtemplate/1.0"> <head><title><template:include elements="/html/head/title/text()"/></title></head> <body> @@ -100,10 +99,10 @@ document = REXML::Document.new(processor.target_file.load) REXML::XPath.first(document, '/html/head/title').get_text.should == 'Title Here' REXML::XPath.first(document, '/html/body/h1').get_text.should == 'Header' end - specify 'should run template engine against resulting content' do + it 'should run template engine against resulting content' do template_content = <<CONTENT <html xmlns="http://www.w3.org/1999/xhtml" xmlns:template="http://buildmaster.rubyforge.org/xtemplate/1.0"> <head><title><template:include elements="/html/head/title/text()"/></title></head> <body> \ No newline at end of file