Sha256: 54d5a1c5840b8f9853799b54e36aa8ec290f696d7f146c36c5c4635aad1c6aeb

Contents?: true

Size: 880 Bytes

Versions: 1

Compression:

Stored size: 880 Bytes

Contents

require 'spec_helper'
require 'puppet/face'

describe "puppet module build" do
  subject { Puppet::Face[:module, :current] }

  describe "option validation" do
    context "without any options" do
      it "should require a path" do
        pattern = /wrong number of arguments/
        expect { subject.build }.to raise_error ArgumentError, pattern
      end
    end
  end

  describe "inline documentation" do
    subject { Puppet::Face[:module, :current].get_action :build }

    its(:summary)     { should =~ /build.*module/im }
    its(:description) { should =~ /build.*module/im }
    its(:returns)     { should =~ /pathname/i }
    its(:examples)    { should_not be_empty }

    %w{ license copyright summary description returns examples }.each do |doc|
      context "of the" do
        its(doc.to_sym) { should_not =~ /(FIXME|REVISIT|TODO)/ }
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
puppet-2.7.9 spec/unit/face/module/build_spec.rb