Update puppetlabs/stdlib module
[mirror/dsa-puppet.git] / 3rdparty / modules / stdlib / spec / unit / puppet / parser / functions / is_absolute_path_spec.rb
index 8931208..589ad82 100644 (file)
@@ -1,6 +1,6 @@
 require 'spec_helper'
 
-describe :is_absolute_path do
+describe 'is_absolute_path' do
   let(:scope) { PuppetlabsSpec::PuppetInternals.scope }
 
   let(:function_args) do
@@ -11,31 +11,28 @@ describe :is_absolute_path do
     scope.function_is_absolute_path(function_args)
   end
 
-
   describe 'validate arity' do
     let(:function_args) do
-       [1,2]
-    end
-    it "should raise a ParseError if there is more than 1 arguments" do
-      lambda { function }.should( raise_error(ArgumentError))
+      [1, 2]
     end
 
+    it 'raises a ParseError if there is more than 1 arguments' do
+      -> { function }.should(raise_error(ArgumentError))
+    end
   end
-  
-  it "should exist" do
+
+  it 'exists' do
     Puppet::Parser::Functions.function(subject).should == "function_#{subject}"
   end
 
   # help enforce good function defination
-  it 'should contain arity' do
-
+  it 'contains arity' do
   end
 
-  it "should raise a ParseError if there is less than 1 arguments" do
-    lambda { function }.should( raise_error(ArgumentError))
+  it 'raises a ParseError if there is less than 1 arguments' do
+    -> { function }.should(raise_error(ArgumentError))
   end
 
-
   describe 'should retrun true' do
     let(:return_value) do
       true
@@ -45,7 +42,8 @@ describe :is_absolute_path do
       let(:function_args) do
         ['c:\temp\test.txt']
       end
-      it 'should return data' do
+
+      it 'returns data' do
         function.should eq(return_value)
       end
     end
@@ -55,7 +53,7 @@ describe :is_absolute_path do
         ['/temp/test.txt']
       end
 
-      it 'should return data' do
+      it 'returns data' do
         function.should eq(return_value)
       end
     end
@@ -65,11 +63,13 @@ describe :is_absolute_path do
     let(:return_value) do
       false
     end
+
     describe 'windows' do
       let(:function_args) do
         ['..\temp\test.txt']
       end
-      it 'should return data' do
+
+      it 'returns data' do
         function.should eq(return_value)
       end
     end
@@ -78,9 +78,10 @@ describe :is_absolute_path do
       let(:function_args) do
         ['../var/lib/puppet']
       end
-      it 'should return data' do
+
+      it 'returns data' do
         function.should eq(return_value)
       end
     end
   end
-end
\ No newline at end of file
+end