]> git.donarmstrong.com Git - dsa-puppet.git/blob - 3rdparty/modules/stdlib/spec/acceptance/strftime_spec.rb
upgrade to stdlib 4.6.1
[dsa-puppet.git] / 3rdparty / modules / stdlib / spec / acceptance / strftime_spec.rb
1 #! /usr/bin/env ruby -S rspec
2 require 'spec_helper_acceptance'
3
4 describe 'strftime function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
5   describe 'success' do
6     it 'gives the Century' do
7       pp = <<-EOS
8       $o = strftime('%C')
9       notice(inline_template('strftime is <%= @o.inspect %>'))
10       EOS
11
12       apply_manifest(pp, :catch_failures => true) do |r|
13         expect(r.stdout).to match(/strftime is "20"/)
14       end
15     end
16     it 'takes a timezone argument'
17   end
18   describe 'failure' do
19     it 'handles no arguments'
20     it 'handles invalid format strings'
21   end
22 end