Sha256: 7c7fe879bc0ab099a4dcdc45f193263d86d89df335026165d35e0b515f1659fe
Contents?: true
Size: 643 Bytes
Versions: 3
Compression:
Stored size: 643 Bytes
Contents
# -*- encoding : utf-8 -*- module Pacto describe ERBProcessor do subject(:processor) { described_class.new } describe '#process' do let(:erb) { '2 + 2 = <%= 2 + 2 %>' } let(:result) { '2 + 2 = 4' } it 'returns the result of ERB' do expect(processor.process(erb)).to eq result end it 'logs the erb processed' do expect(Pacto.configuration.logger).to receive(:debug).with("Processed contract: \"#{result}\"") processor.process erb end it 'does not mess with pure JSONs' do processor.process('{"property": ["one", "two, null"]}') end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
pacto-0.4.0.rc3 | spec/unit/pacto/erb_processor_spec.rb |
pacto-0.4.0.rc2 | spec/unit/pacto/erb_processor_spec.rb |
pacto-0.4.0.rc1 | spec/unit/pacto/erb_processor_spec.rb |