Skip to content

Commit f4de339

Browse files
committed
(maint) Update assert_not_match to refute_match
In Beaker, the assert_not_match method was removed in commit voxpupuli/beaker@6282311 in favor of MiniTest::Assertions#refute_match. This change was released in Beaker 5.0.0. This commit updates all instances of the assert_not_match with refute_match in preparation for a future switch to Beaker 5.
1 parent 6fd3d0f commit f4de339

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

acceptance/tests/environment/enc_nonexistent_directory_environment.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
unless agent['locale'] == 'ja'
7373
assert_match(/Could not find a directory environment named 'doesnotexist'/, result.stderr, "Errors when nonexistent environment is specified")
7474
end
75-
assert_not_match(/In the production environment/, result.stdout, "Executed manifest from production environment")
75+
refute_match(/In the production environment/, result.stdout, "Executed manifest from production environment")
7676
end
7777
end
7878
end

acceptance/tests/resource/package/yum.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def verify_absent(hosts, pkg)
8282
step 'Installing a non-existent version of a known package fails' do
8383
verify_absent agents, 'guid'
8484
apply_manifest_on(agents, 'package {"guid": ensure => "1.1"}') do |result|
85-
assert_not_match(/Package\[guid\]\/ensure: created/, "#{result.host}: #{result.stdout}")
85+
refute_match(/Package\[guid\]\/ensure: created/, "#{result.host}: #{result.stdout}")
8686
assert_match("Package[guid]/ensure: change from 'purged' to '1.1' failed", "#{result.host}: #{result.stderr}")
8787
end
8888
verify_absent agents, 'guid'
@@ -91,7 +91,7 @@ def verify_absent(hosts, pkg)
9191
step 'Installing a non-existent package fails' do
9292
verify_absent agents, 'not_a_package'
9393
apply_manifest_on(agents, 'package {"not_a_package": ensure => present}') do |result|
94-
assert_not_match(/Package\[not_a_package\]\/ensure: created/, "#{result.host}: #{result.stdout}")
94+
refute_match(/Package\[not_a_package\]\/ensure: created/, "#{result.host}: #{result.stdout}")
9595
assert_match("Package[not_a_package]/ensure: change from 'purged' to 'present' failed", "#{result.host}: #{result.stderr}")
9696
end
9797
verify_absent agents, 'not_a_package'
@@ -100,7 +100,7 @@ def verify_absent(hosts, pkg)
100100
step 'Removing a non-existent package succeeds' do
101101
verify_absent agents, 'not_a_package'
102102
apply_manifest_on(agents, 'package {"not_a_package": ensure => absent}') do |result|
103-
assert_not_match(/Package\[not_a_package\]\/ensure/, "#{result.host}: #{result.stdout}")
103+
refute_match(/Package\[not_a_package\]\/ensure/, "#{result.host}: #{result.stdout}")
104104
assert_match('Applied catalog', "#{result.host}: #{result.stdout}")
105105
end
106106
verify_absent agents, 'not_a_package'

0 commit comments

Comments
 (0)