Sha256: dcb6644c96cbbefbbe49351be12fa6c47e714c51c88fe2bf8cd3be7dd0216852
Contents?: true
Size: 672 Bytes
Versions: 2
Compression:
Stored size: 672 Bytes
Contents
require "spec_helper" describe RenderingEngine::ContentHelpers do let(:base_path) { 'root/path' } let(:file_relative_path) { 'login.haml' } let(:file_path) { File.join(base_path, file_relative_path) } let(:content) { double('content_object', source: source) } let(:source) { 'file_source' } let(:content_data) {{ name: 'pawel' }} subject { described_class.new(base_path: base_path, data: content_data) } it '#render' do RenderingEngine::Content.should_receive(:new) .with(file_path, data: content_data) .and_return(content) subject.render(file_relative_path).should eq source end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rendering_engine-0.1.1 | spec/rendering_engine/content_helpers_spec.rb |
rendering_engine-0.1.0 | spec/rendering_engine/content_helpers_spec.rb |