Sha256: eaf53f37e9131935256cfd4b2b057f70b4dba353986be0765e2a4067b63369ea
Contents?: true
Size: 1.2 KB
Versions: 5
Compression:
Stored size: 1.2 KB
Contents
require 'spec_helper_acceptance' require 'util' include PuppetStrings::Acceptance::Util describe 'Generating Markdown' do expected = <<-EOF # Reference ## Classes * [`test`](#test): This class exists to serve as fixture data for testing the puppet strings face ## Classes ### test #### Examples ```puppet class { "test": } ``` #### Parameters ##### `package_name` The name of the package ##### `service_name` The name of the service EOF it 'should render Markdown to stdout when using --format markdown and --stdout' do test_module_path = get_test_module_path(master, /Module test/) on master, puppet('strings', 'generate', '--format markdown', "#{test_module_path}/manifests/init.pp") do output = stdout.chomp expect(JSON.parse(output)).to eq(expected) end end it 'should write Markdown to a file when using --format markdown and --out' do test_module_path = get_test_module_path(master, /Module test/) tmpfile = master.tmpfile('md_output.md') on master, puppet('strings', 'generate', '--format markdown', "--out #{tmpfile}", "#{test_module_path}/manifests/init.pp") output = read_file_on(master, tmpfile) expect(JSON.parse(output)).to eq(expected) end end
Version data entries
5 entries across 5 versions & 1 rubygems