Skip to content

Commit 8a8ebc4

Browse files
author
Helen Campbell
committed
Replace :context with :all in spec tests
1 parent 75a3567 commit 8a8ebc4

22 files changed

Lines changed: 22 additions & 22 deletions

spec/functions/deprecation_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
end
4343
else
4444
describe 'deprecation' do
45-
after(:context) do
45+
after(:all) do
4646
ENV.delete('STDLIB_LOG_DEPRECATIONS')
4747
end
4848
ENV['STDLIB_LOG_DEPRECATIONS'] = "true"

spec/functions/is_array_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
it { is_expected.to run.with_params(1).and_return(false) }
1919
it { is_expected.to run.with_params({}).and_return(false) }
2020
context 'Checking for deprecation warning' do
21-
after(:context) do
21+
after(:all) do
2222
ENV.delete('STDLIB_LOG_DEPRECATIONS')
2323
end
2424
# Checking for deprecation warning, which should only be provoked when the env variable for it is set.

spec/functions/is_bool_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
it { is_expected.to run.with_params('true').and_return(false) }
1515
it { is_expected.to run.with_params('false').and_return(false) }
1616
context 'Checking for deprecation warning' do
17-
after(:context) do
17+
after(:all) do
1818
ENV.delete('STDLIB_LOG_DEPRECATIONS')
1919
end
2020
# Checking for deprecation warning, which should only be provoked when the env variable for it is set.

spec/functions/is_float_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
end
2424

2525
context 'Checking for deprecation warning' do
26-
after(:context) do
26+
after(:all) do
2727
ENV.delete('STDLIB_LOG_DEPRECATIONS')
2828
end
2929
# Checking for deprecation warning, which should only be provoked when the env variable for it is set.

spec/functions/is_integer_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
it { is_expected.to run.with_params('0001234').and_return(false) }
2727

2828
context 'Checking for deprecation warning' do
29-
after(:context) do
29+
after(:all) do
3030
ENV.delete('STDLIB_LOG_DEPRECATIONS')
3131
end
3232
# Checking for deprecation warning, which should only be provoked when the env variable for it is set.

spec/functions/is_ip_address_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
scope.expects(:warning).with(includes('This method is deprecated')).never
3434
is_expected.to run.with_params('1.2.3.4').and_return(true)
3535
end
36-
after(:context) do
36+
after(:all) do
3737
ENV.delete('STDLIB_LOG_DEPRECATIONS')
3838
end
3939
end

spec/functions/is_ipv4_address_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
it { is_expected.to run.with_params('one').and_return(false) }
1313

1414
context 'Checking for deprecation warning', if: Puppet.version.to_f < 4.0 do
15-
after(:context) do
15+
after(:all) do
1616
ENV.delete('STDLIB_LOG_DEPRECATIONS')
1717
end
1818
# Checking for deprecation warning, which should only be provoked when the env variable for it is set.

spec/functions/is_ipv6_address_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
it { is_expected.to run.with_params('one').and_return(false) }
1313

1414
context 'Checking for deprecation warning', if: Puppet.version.to_f < 4.0 do
15-
after(:context) do
15+
after(:all) do
1616
ENV.delete('STDLIB_LOG_DEPRECATIONS')
1717
end
1818
# Checking for deprecation warning, which should only be provoked when the env variable for it is set.

spec/functions/is_numeric_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
it { is_expected.to run.with_params(' - 1234').and_return(false) }
3030

3131
context 'Checking for deprecation warning' do
32-
after(:context) do
32+
after(:all) do
3333
ENV.delete('STDLIB_LOG_DEPRECATIONS')
3434
end
3535
# Checking for deprecation warning, which should only be provoked when the env variable for it is set.

spec/functions/is_string_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
it { is_expected.to run.with_params('0001234').and_return(true) }
2929

3030
context 'Checking for deprecation warning' do
31-
after(:context) do
31+
after(:all) do
3232
ENV.delete('STDLIB_LOG_DEPRECATIONS')
3333
end
3434
# Checking for deprecation warning, which should only be provoked when the env variable for it is set.

0 commit comments

Comments
 (0)