0
0
zero/spec/unit/zero/renderer/template_finder/exist_predicate_spec.rb
Gibheer 714c540e4b reworked parts of the template finder
The template finder is now the instance to ask for templates. It was
already looking for them, so it should be able to handle questions
regarding the existence of templates too.
2013-02-27 21:15:05 +01:00

16 lines
458 B
Ruby

require 'spec_helper'
describe Zero::Renderer::TemplateFinder, '#exist?' do
subject { described_class.new(template_path, type_map) }
let(:template_path) { 'spec/fixtures/templates/' }
let(:type_map) { {'html' => 'text/html'} }
it 'returns true when the template exists' do
expect(subject.exist?('index')).to be(true)
end
it 'returns false when the template does not exist' do
expect(subject.exist?('not_found')).to be(false)
end
end