]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - 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
diff --git a/3rdparty/modules/stdlib/spec/acceptance/strftime_spec.rb b/3rdparty/modules/stdlib/spec/acceptance/strftime_spec.rb
new file mode 100755 (executable)
index 0000000..53b7f90
--- /dev/null
@@ -0,0 +1,22 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper_acceptance'
+
+describe 'strftime function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+  describe 'success' do
+    it 'gives the Century' do
+      pp = <<-EOS
+      $o = strftime('%C')
+      notice(inline_template('strftime is <%= @o.inspect %>'))
+      EOS
+
+      apply_manifest(pp, :catch_failures => true) do |r|
+        expect(r.stdout).to match(/strftime is "20"/)
+      end
+    end
+    it 'takes a timezone argument'
+  end
+  describe 'failure' do
+    it 'handles no arguments'
+    it 'handles invalid format strings'
+  end
+end