summaryrefslogtreecommitdiff
path: root/puppet/modules/stdlib/spec/acceptance/min_spec.rb
blob: 509092d3c7c53b161329c660d914de234dd74663 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#! /usr/bin/env ruby -S rspec
require 'spec_helper_acceptance'

describe 'min function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
  describe 'success' do
    it 'mins arrays' do
      pp = <<-EOS
      $o = min("the","public","art","galleries")
      notice(inline_template('min is <%= @o.inspect %>'))
      EOS

      apply_manifest(pp, :catch_failures => true) do |r|
        expect(r.stdout).to match(/min is "art"/)
      end
    end
  end
  describe 'failure' do
    it 'handles no arguments'
  end
end