From 43a6ada2edee277bf3a3d21a27fa7f8f2c7db8cb Mon Sep 17 00:00:00 2001 From: Gibheer Date: Mon, 26 Nov 2012 21:16:34 +0100 Subject: now the renderer correctly saves all templates Before this fix the renderer was not able to save the templates and types in the correct way. It still needs some cleanup, but it works now. --- spec/unit/renderer/read_template_path_spec.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'spec/unit/renderer') diff --git a/spec/unit/renderer/read_template_path_spec.rb b/spec/unit/renderer/read_template_path_spec.rb index 8522007..bc441ed 100644 --- a/spec/unit/renderer/read_template_path_spec.rb +++ b/spec/unit/renderer/read_template_path_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' describe Zero::Renderer, 'read_template_path!' do subject { Zero::Renderer.new(template_path, type_map) } let(:template_path) { 'foo' } - let(:file_list) { ['./foo/welcome/index.html.erb'] } + let(:file_list) { ['foo/welcome/index.html.erb'] } before :each do subject.stub(:search_files).and_return(file_list) @@ -18,14 +18,14 @@ describe Zero::Renderer, 'read_template_path!' do context 'without mapping' do let(:type_map) { {} } - let(:result) { { 'html' => './foo/welcome/index.html.erb' } } + let(:result) { { 'html' => 'foo/welcome/index.html.erb' } } it_behaves_like 'a template loader' end context 'with a single mapping' do let(:type_map) { {'html' => 'text/html' } } - let(:result) { { 'text/html' => './foo/welcome/index.html.erb' } } + let(:result) { { 'text/html' => 'foo/welcome/index.html.erb' } } it_behaves_like 'a template loader' end @@ -33,8 +33,8 @@ describe Zero::Renderer, 'read_template_path!' do context 'with multiple mappings' do let(:type_map) { {'html' => ['text/html', 'text/xml'] } } let(:result) { { - 'text/html' => './foo/welcome/index.html.erb', - 'text/xml' => './foo/welcome/index.html.erb' + 'text/html' => 'foo/welcome/index.html.erb', + 'text/xml' => 'foo/welcome/index.html.erb' } } it_behaves_like 'a template loader' -- cgit v1.2.3-70-g09d2