Sha256: 09ef9a803d5094122d682b5ebe919ce77797d88cfdae37243000fe9fd09efaa5
Contents?: true
Size: 999 Bytes
Versions: 34
Compression:
Stored size: 999 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Actions::CreateOutput do context '#initialize' do it 'requires template, data and output' do output = double('IO') repository = double('TemplateRepository') data = double('Data') engine_klass = Class.new do def initialize(data) end def compile(template, destination) end end Actions::CreateOutput.new(:template, output, data, engine_klass, repository) end end context '#run' do it 'runs the action' do output = double('$stdout') repository = double('TemplateRepository') expect(repository).to receive(:find).with(:template) data = double('Data') engine_klass = Class.new do def initialize(data) end def compile(template, destination) end end silence(:stderr) do Actions::CreateOutput.new(:template, output, data, engine_klass, repository).run end end end end
Version data entries
34 entries across 34 versions & 2 rubygems