X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=3rdparty%2Fmodules%2Fstdlib%2Fspec%2Ffunctions%2Fhas_ip_network_spec.rb;h=b9dbde91093a36d749bdc30e7daac38c53f0faa5;hb=30caaa85aed7015ca0d77216bff175eebd917eb7;hp=57cf613a20e78ad28d1a4cf8a6133029fe3ccd5a;hpb=6963202b4b62c2816655ac9532521b018fdf83bd;p=mirror%2Fdsa-puppet.git diff --git a/3rdparty/modules/stdlib/spec/functions/has_ip_network_spec.rb b/3rdparty/modules/stdlib/spec/functions/has_ip_network_spec.rb old mode 100755 new mode 100644 index 57cf613a2..b9dbde910 --- a/3rdparty/modules/stdlib/spec/functions/has_ip_network_spec.rb +++ b/3rdparty/modules/stdlib/spec/functions/has_ip_network_spec.rb @@ -2,10 +2,10 @@ require 'spec_helper' describe 'has_ip_network' do it { is_expected.not_to eq(nil) } - it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) } - it { is_expected.to run.with_params("one", "two").and_raise_error(Puppet::ParseError, /wrong number of arguments/i) } + it { is_expected.to run.with_params.and_raise_error(Puppet::ParseError, %r{wrong number of arguments}i) } + it { is_expected.to run.with_params('one', 'two').and_raise_error(Puppet::ParseError, %r{wrong number of arguments}i) } - context "On Linux Systems" do + context 'when on Linux Systems' do let(:facts) do { :interfaces => 'eth0,lo', @@ -17,5 +17,6 @@ describe 'has_ip_network' do it { is_expected.to run.with_params('127.0.0.0').and_return(true) } it { is_expected.to run.with_params('10.0.0.0').and_return(true) } it { is_expected.to run.with_params('8.8.8.0').and_return(false) } + it { is_expected.to run.with_params('invalid').and_return(false) } end end