From 65380bcdfbe91f85013d8a925cdd719826209ce4 Mon Sep 17 00:00:00 2001 From: Adrien Thebo Date: Tue, 28 May 2013 11:14:28 -0700 Subject: (maint) Clean up range_spec error expectation Replace `lambda` with `expect` for making an error expectation Add an explicit error message in expectation --- spec/unit/puppet/parser/functions/range_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'spec/unit/puppet') diff --git a/spec/unit/puppet/parser/functions/range_spec.rb b/spec/unit/puppet/parser/functions/range_spec.rb index 07b6f11..426903c 100644 --- a/spec/unit/puppet/parser/functions/range_spec.rb +++ b/spec/unit/puppet/parser/functions/range_spec.rb @@ -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 -- cgit v1.2.3