Sha256: 2b32e535d29911101b4201eb3b3340a8f285e8fb537b37cc7742bbd8ff4f514b
Contents?: true
Size: 982 Bytes
Versions: 1
Compression:
Stored size: 982 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' RSpec.describe LiquidDiagrams::Renderers::PlantumlRenderer do subject(:renderer) { described_class.new('content') } describe '#render' do before do allow(renderer).to receive(:build_command) allow(LiquidDiagrams::Rendering).to receive( :render_with_stdin_stdout ).and_return('<?xml version="1.0" encoding="UTF-8" standalone="no"?><>') end it 'call build_command' do renderer.render expect(renderer).to have_received(:build_command) end it 'render with stdin and stdout' do renderer.render expect(LiquidDiagrams::Rendering).to have_received(:render_with_stdin_stdout) end it 'remove xml heading' do expect(renderer.render).to eq '<>' end end describe '#build_command' do it do command = renderer.build_command expect(command).to match 'Plantuml' expect(command).to match '-tsvg -pipe' end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
liquid-diagrams-0.1.0 | spec/liquid_diagrams/renderers/plantuml_renderer_spec.rb |