24dfa2fdab63c2275697db0534bcf5050aa644d5
[mirror/dsa-puppet.git] / 3rdparty / modules / stdlib / spec / functions / abs_spec.rb
1 require 'spec_helper'
2 if Puppet::Util::Package.versioncmp(Puppet.version, '6.0.0') < 0
3   describe 'abs' do
4     it { is_expected.not_to eq(nil) }
5     it { is_expected.to run.with_params(-34).and_return(34) }
6     it { is_expected.to run.with_params('-34').and_return(34) }
7     it { is_expected.to run.with_params(34).and_return(34) }
8     it { is_expected.to run.with_params('34').and_return(34) }
9     it { is_expected.to run.with_params(-34.5).and_return(34.5) }
10     it { is_expected.to run.with_params('-34.5').and_return(34.5) }
11     it { is_expected.to run.with_params(34.5).and_return(34.5) }
12     it { is_expected.to run.with_params('34.5').and_return(34.5) }
13   end
14 end