Sha256: 883eb8026f56ecba2972645d62f63d1eb421479a6be10e61e22fa00ee7441ecf
Contents?: true
Size: 705 Bytes
Versions: 16
Compression:
Stored size: 705 Bytes
Contents
# frozen_string_literal: true require 'rails_helper' describe DocumentExporter::Docx do describe '#export' do let(:content) { 'content' } let(:generated_content) { 'generated content' } let(:document) { create :document } before do allow(ApplicationController).to receive(:render).and_return(content) allow(PandocRuby).to receive(:convert).and_return(generated_content) end subject { described_class.new(document).export } it 'calls Pandoc wrapper' do expect(PandocRuby).to receive(:convert).with(content, from: :html, to: :docx) subject end it 'returns generated data' do expect(subject).to eq generated_content end end end
Version data entries
16 entries across 16 versions & 1 rubygems