Sha256: 33b1a78c9e5efc674e6007ba9926faee5ce67fe68400f531f8f78cb8b49eddf4
Contents?: true
Size: 764 Bytes
Versions: 46
Compression:
Stored size: 764 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe ErbGenerator do context '#compile' do it 'needs a source and a target' do data = double('binding') allow(data).to receive(:instance_binding) do Class.new do def pid_file '/path/pid_file' end def instance_binding binding end end.new.instance_binding end source = double('source') allow(source).to receive(:encoding) allow(source).to receive(:read).and_return('Path <%= pid_file %>') destination = double('destination') expect(destination).to receive(:puts).with('Path /path/pid_file') gen = ErbGenerator.new(data) gen.compile(source, destination) end end end
Version data entries
46 entries across 46 versions & 2 rubygems