diff options
author | Gibheer <gibheer@gmail.com> | 2012-11-26 21:16:34 +0100 |
---|---|---|
committer | Gibheer <gibheer@gmail.com> | 2012-11-26 21:41:09 +0100 |
commit | 43a6ada2edee277bf3a3d21a27fa7f8f2c7db8cb (patch) | |
tree | 7b0fabf7bff7e7fd9376ed0d53423ca2acc734fa /spec/unit/renderer | |
parent | cb39d8ac909c5c7c5d564c883b6d5bf2c5e26760 (diff) |
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.
Diffstat (limited to 'spec/unit/renderer')
-rw-r--r-- | spec/unit/renderer/read_template_path_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
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' |