]> gitweb.fluxo.info Git - puppet-stdlib.git/commitdiff
(maint) Clean up range_spec error expectation
authorAdrien Thebo <git@somethingsinistral.net>
Tue, 28 May 2013 18:14:28 +0000 (11:14 -0700)
committerAdrien Thebo <git@somethingsinistral.net>
Tue, 28 May 2013 18:14:28 +0000 (11:14 -0700)
Replace `lambda` with `expect` for making an error expectation

Add an explicit error message in expectation

spec/unit/puppet/parser/functions/range_spec.rb

index 07b6f11e4ae6cefcdfcf161af617abef085a1961..426903c4f783367f34d59ebbfff26981e1e5b4a3 100644 (file)
@@ -9,7 +9,7 @@ describe "the range function" do
   end
 
   it "raises a ParseError if there is less than 1 arguments" do
-    lambda { scope.function_range([]) }.should( raise_error(Puppet::ParseError))
+    expect { scope.function_range([]) }.to raise_error Puppet::ParseError, /Wrong number of arguments.*0 for 1/
   end
 
   describe 'with a letter range' do