From 772a2d2f406b65ef65161a04455865b37a1c8456 Mon Sep 17 00:00:00 2001 From: Eric Putnam Date: Thu, 27 Jul 2017 09:24:52 -0700 Subject: (maint) move/rewrite round() as ruby function --- spec/functions/round_spec.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'spec/functions/round_spec.rb') diff --git a/spec/functions/round_spec.rb b/spec/functions/round_spec.rb index 5aa801c..8b13478 100755 --- a/spec/functions/round_spec.rb +++ b/spec/functions/round_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe 'stdlib::round' do +describe 'round' do it { is_expected.not_to eq(nil) } it { is_expected.to run.with_params(34.3).and_return(34) } it { is_expected.to run.with_params(-34.3).and_return(-34) } @@ -8,4 +8,7 @@ describe 'stdlib::round' do it { is_expected.to run.with_params(-34.5).and_return(-35) } it { is_expected.to run.with_params(34.7).and_return(35) } it { is_expected.to run.with_params(-34.7).and_return(-35) } + it { is_expected.to run.with_params("test").and_raise_error Puppet::ParseError } + it { is_expected.to run.with_params("test", "best").and_raise_error Puppet::ParseError } + it { is_expected.to run.with_params(3, 4).and_raise_error Puppet::ParseError } end -- cgit v1.2.3