diff --git a/spec/acceptance/class_spec.rb b/spec/acceptance/class_spec.rb index 94da752d..9a399cf3 100644 --- a/spec/acceptance/class_spec.rb +++ b/spec/acceptance/class_spec.rb @@ -39,7 +39,9 @@ end context 'set global_config_entry secret', if: fact('os.family') == 'RedHat' do - let (:pp) { "class { 'nodejs': }; nodejs::npm::global_config_entry { '//path.to.registry/:_secret': ensure => present, value => 'cGFzc3dvcmQ=', require => Package[nodejs],}" } + let :pp do + "class { 'nodejs': }; nodejs::npm::global_config_entry { '//path.to.registry/:_secret': ensure => present, value => 'cGFzc3dvcmQ=', require => Package[nodejs],}" + end it_behaves_like 'an idempotent resource' @@ -48,8 +50,8 @@ end describe 'npm config' do - it ('contains the global_config_entry secret') do - npm_output = shell("cat $(/usr/bin/npm config get globalconfig)") + it 'contains the global_config_entry secret' do + npm_output = shell('cat $(/usr/bin/npm config get globalconfig)') expect(npm_output.stdout).to match '//path.to.registry/:_secret="cGFzc3dvcmQ="' end end diff --git a/spec/defines/global_config_entry_spec.rb b/spec/defines/global_config_entry_spec.rb index 71639089..3e9772bf 100644 --- a/spec/defines/global_config_entry_spec.rb +++ b/spec/defines/global_config_entry_spec.rb @@ -60,7 +60,7 @@ end it 'npm config set :_secret should be executed' do - is_expected.to contain_exec('npm_config present :_secret').with('command' => '/usr/bin/npm config set //path.to.registry/:_secret cGFzc3dvcmQ= --global') + is_expected.to contain_exec('npm_config present //path.to.registry/:_secret').with('command' => '/usr/bin/npm config set //path.to.registry/:_secret cGFzc3dvcmQ= --global') end end end