require_relative '../spec_helper' describe 'templates' do it 'should have a list of available templates' do Templates.all_templates.should_not be_empty end context 'each available template' do it 'should be specified by the name of the template, not the path' do Templates.all_templates.each do |template_name| File.basename(template_name).should == template_name end end it 'should have a valid template name' do Templates.all_templates.each do |template_name| template = Templates.new(template_name) template.template_name.should == template_name end end it 'should have a path ending to the template name' do Templates.all_templates.each do |template_name| template = Templates.new(template_name) File.basename(template.path).should == template_name end end it 'should have a valid manifest' do Templates.all_templates.each do |template_name| template = Templates.new(template_name) File.exists?(template.manifest).should be_true end end end end