diff options
author | Josh Cooper <josh@puppet.com> | 2018-06-27 23:44:26 -0700 |
---|---|---|
committer | Josh Cooper <josh@puppet.com> | 2018-06-27 23:45:26 -0700 |
commit | 74b01806ce0d003c00fe665d671d4b282af33424 (patch) | |
tree | 9c6811e40043047f995cfc97f6f6f4271210be64 /spec | |
parent | e2a0a5a03e0789534c3fc45ceaab442f13fc20d9 (diff) | |
download | puppet-augeas_core-74b01806ce0d003c00fe665d671d4b282af33424.tar.gz puppet-augeas_core-74b01806ce0d003c00fe665d671d4b282af33424.tar.bz2 |
Use guard clause and avoid assignment in conditional
Diffstat (limited to 'spec')
-rw-r--r-- | spec/acceptance/hosts.rb | 2 | ||||
-rw-r--r-- | spec/acceptance/puppet.rb | 2 | ||||
-rw-r--r-- | spec/acceptance/services.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/spec/acceptance/hosts.rb b/spec/acceptance/hosts.rb index dabec5a..297d923 100644 --- a/spec/acceptance/hosts.rb +++ b/spec/acceptance/hosts.rb @@ -11,7 +11,7 @@ test_name 'Augeas hosts file' do 'windows', 'cisco_ios', # PUP-7380 ] - confine :to, {}, hosts.reject { |host| host[:roles].include?('master') } + confine(:to, {}, hosts.reject { |host| host[:roles].include?('master') }) step 'Backup the hosts file' do on hosts, 'cp /etc/hosts /tmp/hosts.bak' diff --git a/spec/acceptance/puppet.rb b/spec/acceptance/puppet.rb index 048a3db..2c17238 100644 --- a/spec/acceptance/puppet.rb +++ b/spec/acceptance/puppet.rb @@ -7,7 +7,7 @@ test_name 'Augeas puppet configuration' do skip_test 'requires augeas which is included in AIO' if @options[:type] != 'aio' confine :except, platform: 'windows' - confine :to, {}, hosts.reject { |host| host[:roles].include?('master') } + confine(:to, {}, hosts.reject { |host| host[:roles].include?('master') }) teardown do agents.each do |agent| diff --git a/spec/acceptance/services.rb b/spec/acceptance/services.rb index 2e48af0..523b953 100644 --- a/spec/acceptance/services.rb +++ b/spec/acceptance/services.rb @@ -9,7 +9,7 @@ test_name 'Augeas services file' do confine :except, platform: 'windows' confine :except, platform: 'osx' - confine :to, {}, hosts.reject { |host| host[:roles].include?('master') } + confine(:to, {}, hosts.reject { |host| host[:roles].include?('master') }) step 'Backup the services file' do on hosts, 'cp /etc/services /tmp/services.bak' |