X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=3rdparty%2Fmodules%2Fstdlib%2Fspec%2Ffunctions%2Fcount_spec.rb;h=54e1491c4fdb2152e064400f460f82d260628b7e;hb=59812388abf4638d6065ffda934d1866af902302;hp=3854cb877417fd9e1ca4af05872ed899efdd3d21;hpb=6963202b4b62c2816655ac9532521b018fdf83bd;p=mirror%2Fdsa-puppet.git diff --git a/3rdparty/modules/stdlib/spec/functions/count_spec.rb b/3rdparty/modules/stdlib/spec/functions/count_spec.rb old mode 100755 new mode 100644 index 3854cb877..54e1491c4 --- a/3rdparty/modules/stdlib/spec/functions/count_spec.rb +++ b/3rdparty/modules/stdlib/spec/functions/count_spec.rb @@ -2,22 +2,22 @@ require 'spec_helper' describe 'count' do it { is_expected.not_to eq(nil) } - it { is_expected.to run.with_params().and_raise_error(ArgumentError) } - it { is_expected.to run.with_params("one").and_raise_error(ArgumentError) } - it { is_expected.to run.with_params("one", "two").and_return(1) } + it { is_expected.to run.with_params.and_raise_error(ArgumentError) } + it { is_expected.to run.with_params('one').and_raise_error(ArgumentError) } + it { is_expected.to run.with_params('one', 'two').and_return(1) } it { - pending("should actually be like this, and not like above") - is_expected.to run.with_params("one", "two").and_raise_error(ArgumentError) + pending('should actually be like this, and not like above') + is_expected.to run.with_params('one', 'two').and_raise_error(ArgumentError) } - it { is_expected.to run.with_params("one", "two", "three").and_raise_error(ArgumentError) } - it { is_expected.to run.with_params(["one", "two", "three"]).and_return(3) } - it { is_expected.to run.with_params(["one", "two", "two"], "two").and_return(2) } - it { is_expected.to run.with_params(["one", nil, "two"]).and_return(2) } - it { is_expected.to run.with_params(["one", "", "two"]).and_return(2) } - it { is_expected.to run.with_params(["one", :undef, "two"]).and_return(2) } + it { is_expected.to run.with_params('one', 'two', 'three').and_raise_error(ArgumentError) } + it { is_expected.to run.with_params(['one', 'two', 'three']).and_return(3) } + it { is_expected.to run.with_params(['one', 'two', 'two'], 'two').and_return(2) } + it { is_expected.to run.with_params(['one', nil, 'two']).and_return(2) } + it { is_expected.to run.with_params(['one', '', 'two']).and_return(2) } + it { is_expected.to run.with_params(['one', :undef, 'two']).and_return(2) } - it { is_expected.to run.with_params(["ổņ℮", "ŧщộ", "three"]).and_return(3) } - it { is_expected.to run.with_params(["ổņ℮", "ŧщộ", "ŧщộ"], "ŧщộ").and_return(2) } - it { is_expected.to run.with_params(["ổņ℮", nil, "ŧщộ"]).and_return(2) } - it { is_expected.to run.with_params(["ổņ℮", :undef, "ŧщộ"]).and_return(2) } + it { is_expected.to run.with_params(['ổņ℮', 'ŧщộ', 'three']).and_return(3) } + it { is_expected.to run.with_params(['ổņ℮', 'ŧщộ', 'ŧщộ'], 'ŧщộ').and_return(2) } + it { is_expected.to run.with_params(['ổņ℮', nil, 'ŧщộ']).and_return(2) } + it { is_expected.to run.with_params(['ổņ℮', :undef, 'ŧщộ']).and_return(2) } end