# encoding: utf-8 require 'spec_helper' describe TemplateFile do context '#initialize' do it 'requires a path' do TemplateFile.new('/path/asfd') end end context '#name' do it 'has a name based on path' do file = TemplateFile.new('/path/asdf') expect(file.name).to eq(:asdf) end end context '#read' do it 'reads content' do file = create_file('asdf', 'content') file = TemplateFile.new(file) expect(file.read).to eq('content') end end end