test/buildmaster/templatelets/tc_include.rb in BuildMaster-0.8.1 vs test/buildmaster/templatelets/tc_include.rb in BuildMaster-0.9.0

- old
+ new

@@ -9,12 +9,19 @@ require 'buildmaster/site_spec' require 'buildmaster/source_content' require 'buildmaster/templatelets/include' module BuildMaster -class IncludeTest < CommonTemplateletTest - def test_should_include_the_source + +context 'IncludeTest' do + include HelperMethods + + setup do + setup_spec + end + + specify 'should_include_the_source' do target = create_element('target') template = create_element('include') template.attributes['elements'] = '/item/*' source_content = <<CONTENT <item> @@ -24,11 +31,11 @@ </item> CONTENT source = SourceContent.new(Pathname.new('doc/index.html'), REXML::Document.new(source_content)) include = Include.new(SiteSpec.new) include.process(target, template, source) - assert_equal('test', REXML::XPath.first(target, 'one').text) - assert_equal('text', target.text.strip!) + REXML::XPath.first(target, 'one').text.should_equal 'test' + target.text.strip!.should_equal 'text' end end end