summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorHelen Campbell <helen@puppetlabs.com>2016-10-03 14:12:32 +0100
committerHelen Campbell <helen@puppetlabs.com>2016-10-03 14:12:32 +0100
commit8a8ebc4850abe4996056a2700a6a50ac7666a922 (patch)
tree4b5c00e27043d10a0cd9ad3722266462c6b6bc85 /spec
parent75a35675cad0bc2fef03c74a5a3bcc28fff9f9d0 (diff)
Replace :context with :all in spec tests
Diffstat (limited to 'spec')
-rw-r--r--spec/functions/deprecation_spec.rb2
-rwxr-xr-xspec/functions/is_array_spec.rb2
-rwxr-xr-xspec/functions/is_bool_spec.rb2
-rwxr-xr-xspec/functions/is_float_spec.rb2
-rwxr-xr-xspec/functions/is_integer_spec.rb2
-rwxr-xr-xspec/functions/is_ip_address_spec.rb2
-rw-r--r--spec/functions/is_ipv4_address_spec.rb2
-rw-r--r--spec/functions/is_ipv6_address_spec.rb2
-rwxr-xr-xspec/functions/is_numeric_spec.rb2
-rwxr-xr-xspec/functions/is_string_spec.rb2
-rwxr-xr-xspec/functions/validate_absolute_path_spec.rb2
-rwxr-xr-xspec/functions/validate_array_spec.rb2
-rwxr-xr-xspec/functions/validate_bool_spec.rb2
-rwxr-xr-xspec/functions/validate_hash_spec.rb2
-rwxr-xr-xspec/functions/validate_integer_spec.rb2
-rw-r--r--spec/functions/validate_ip_address_spec.rb2
-rwxr-xr-xspec/functions/validate_ipv4_address_spec.rb2
-rwxr-xr-xspec/functions/validate_ipv6_address_spec.rb2
-rwxr-xr-xspec/functions/validate_numeric_spec.rb2
-rwxr-xr-xspec/functions/validate_re_spec.rb2
-rwxr-xr-xspec/functions/validate_slength_spec.rb2
-rwxr-xr-xspec/functions/validate_string_spec.rb2
22 files changed, 22 insertions, 22 deletions
diff --git a/spec/functions/deprecation_spec.rb b/spec/functions/deprecation_spec.rb
index 4321c3d..9859833 100644
--- a/spec/functions/deprecation_spec.rb
+++ b/spec/functions/deprecation_spec.rb
@@ -42,7 +42,7 @@ if Puppet.version.to_f >= 4.0
end
else
describe 'deprecation' do
- after(:context) do
+ after(:all) do
ENV.delete('STDLIB_LOG_DEPRECATIONS')
end
ENV['STDLIB_LOG_DEPRECATIONS'] = "true"
diff --git a/spec/functions/is_array_spec.rb b/spec/functions/is_array_spec.rb
index 2350b7f..e89f54b 100755
--- a/spec/functions/is_array_spec.rb
+++ b/spec/functions/is_array_spec.rb
@@ -18,7 +18,7 @@ describe 'is_array' do
it { is_expected.to run.with_params(1).and_return(false) }
it { is_expected.to run.with_params({}).and_return(false) }
context 'Checking for deprecation warning' do
- after(:context) do
+ after(:all) do
ENV.delete('STDLIB_LOG_DEPRECATIONS')
end
# Checking for deprecation warning, which should only be provoked when the env variable for it is set.
diff --git a/spec/functions/is_bool_spec.rb b/spec/functions/is_bool_spec.rb
index 7b2173e..d21345c 100755
--- a/spec/functions/is_bool_spec.rb
+++ b/spec/functions/is_bool_spec.rb
@@ -14,7 +14,7 @@ describe 'is_bool' do
it { is_expected.to run.with_params('true').and_return(false) }
it { is_expected.to run.with_params('false').and_return(false) }
context 'Checking for deprecation warning' do
- after(:context) do
+ after(:all) do
ENV.delete('STDLIB_LOG_DEPRECATIONS')
end
# Checking for deprecation warning, which should only be provoked when the env variable for it is set.
diff --git a/spec/functions/is_float_spec.rb b/spec/functions/is_float_spec.rb
index 44bdc48..af3322e 100755
--- a/spec/functions/is_float_spec.rb
+++ b/spec/functions/is_float_spec.rb
@@ -23,7 +23,7 @@ describe 'is_float' do
end
context 'Checking for deprecation warning' do
- after(:context) do
+ after(:all) do
ENV.delete('STDLIB_LOG_DEPRECATIONS')
end
# Checking for deprecation warning, which should only be provoked when the env variable for it is set.
diff --git a/spec/functions/is_integer_spec.rb b/spec/functions/is_integer_spec.rb
index 4b5dd21..b296830 100755
--- a/spec/functions/is_integer_spec.rb
+++ b/spec/functions/is_integer_spec.rb
@@ -26,7 +26,7 @@ describe 'is_integer' do
it { is_expected.to run.with_params('0001234').and_return(false) }
context 'Checking for deprecation warning' do
- after(:context) do
+ after(:all) do
ENV.delete('STDLIB_LOG_DEPRECATIONS')
end
# Checking for deprecation warning, which should only be provoked when the env variable for it is set.
diff --git a/spec/functions/is_ip_address_spec.rb b/spec/functions/is_ip_address_spec.rb
index fc8af60..39525d7 100755
--- a/spec/functions/is_ip_address_spec.rb
+++ b/spec/functions/is_ip_address_spec.rb
@@ -33,7 +33,7 @@ describe 'is_ip_address' do
scope.expects(:warning).with(includes('This method is deprecated')).never
is_expected.to run.with_params('1.2.3.4').and_return(true)
end
- after(:context) do
+ after(:all) do
ENV.delete('STDLIB_LOG_DEPRECATIONS')
end
end
diff --git a/spec/functions/is_ipv4_address_spec.rb b/spec/functions/is_ipv4_address_spec.rb
index 9d53a9d..e39d93b 100644
--- a/spec/functions/is_ipv4_address_spec.rb
+++ b/spec/functions/is_ipv4_address_spec.rb
@@ -12,7 +12,7 @@ describe 'is_ipv4_address' do
it { is_expected.to run.with_params('one').and_return(false) }
context 'Checking for deprecation warning', if: Puppet.version.to_f < 4.0 do
- after(:context) do
+ after(:all) do
ENV.delete('STDLIB_LOG_DEPRECATIONS')
end
# Checking for deprecation warning, which should only be provoked when the env variable for it is set.
diff --git a/spec/functions/is_ipv6_address_spec.rb b/spec/functions/is_ipv6_address_spec.rb
index 4449fea..acd6a87 100644
--- a/spec/functions/is_ipv6_address_spec.rb
+++ b/spec/functions/is_ipv6_address_spec.rb
@@ -12,7 +12,7 @@ describe 'is_ipv6_address' do
it { is_expected.to run.with_params('one').and_return(false) }
context 'Checking for deprecation warning', if: Puppet.version.to_f < 4.0 do
- after(:context) do
+ after(:all) do
ENV.delete('STDLIB_LOG_DEPRECATIONS')
end
# Checking for deprecation warning, which should only be provoked when the env variable for it is set.
diff --git a/spec/functions/is_numeric_spec.rb b/spec/functions/is_numeric_spec.rb
index ccfb9d8..5962d8a 100755
--- a/spec/functions/is_numeric_spec.rb
+++ b/spec/functions/is_numeric_spec.rb
@@ -29,7 +29,7 @@ describe 'is_numeric' do
it { is_expected.to run.with_params(' - 1234').and_return(false) }
context 'Checking for deprecation warning' do
- after(:context) do
+ after(:all) do
ENV.delete('STDLIB_LOG_DEPRECATIONS')
end
# Checking for deprecation warning, which should only be provoked when the env variable for it is set.
diff --git a/spec/functions/is_string_spec.rb b/spec/functions/is_string_spec.rb
index 460d6e0..e92f85c 100755
--- a/spec/functions/is_string_spec.rb
+++ b/spec/functions/is_string_spec.rb
@@ -28,7 +28,7 @@ describe 'is_string' do
it { is_expected.to run.with_params('0001234').and_return(true) }
context 'Checking for deprecation warning' do
- after(:context) do
+ after(:all) do
ENV.delete('STDLIB_LOG_DEPRECATIONS')
end
# Checking for deprecation warning, which should only be provoked when the env variable for it is set.
diff --git a/spec/functions/validate_absolute_path_spec.rb b/spec/functions/validate_absolute_path_spec.rb
index bdb55f0..9397da5 100755
--- a/spec/functions/validate_absolute_path_spec.rb
+++ b/spec/functions/validate_absolute_path_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe 'validate_absolute_path' do
- after(:context) do
+ after(:all) do
ENV.delete('STDLIB_LOG_DEPRECATIONS')
end
diff --git a/spec/functions/validate_array_spec.rb b/spec/functions/validate_array_spec.rb
index f395d16..409b3dc 100755
--- a/spec/functions/validate_array_spec.rb
+++ b/spec/functions/validate_array_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
describe 'validate_array' do
describe 'signature validation' do
- after(:context) do
+ after(:all) do
ENV.delete('STDLIB_LOG_DEPRECATIONS')
end
it { is_expected.not_to eq(nil) }
diff --git a/spec/functions/validate_bool_spec.rb b/spec/functions/validate_bool_spec.rb
index 8b7e438..3074d88 100755
--- a/spec/functions/validate_bool_spec.rb
+++ b/spec/functions/validate_bool_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe 'validate_bool' do
- after(:context) do
+ after(:all) do
ENV.delete('STDLIB_LOG_DEPRECATIONS')
end
diff --git a/spec/functions/validate_hash_spec.rb b/spec/functions/validate_hash_spec.rb
index 7b118e2..7533abe 100755
--- a/spec/functions/validate_hash_spec.rb
+++ b/spec/functions/validate_hash_spec.rb
@@ -6,7 +6,7 @@ describe 'validate_hash' do
it { is_expected.to run.with_params().and_raise_error(Puppet::ParseError, /wrong number of arguments/i) }
describe 'check for deprecation warning' do
- after(:context) do
+ after(:all) do
ENV.delete('STDLIB_LOG_DEPRECATIONS')
end
# Checking for deprecation warning
diff --git a/spec/functions/validate_integer_spec.rb b/spec/functions/validate_integer_spec.rb
index ffc59f8..6558d00 100755
--- a/spec/functions/validate_integer_spec.rb
+++ b/spec/functions/validate_integer_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe 'validate_integer' do
- after(:context) do
+ after(:all) do
ENV.delete('STDLIB_LOG_DEPRECATIONS')
end
diff --git a/spec/functions/validate_ip_address_spec.rb b/spec/functions/validate_ip_address_spec.rb
index 7040a8d..0414f5e 100644
--- a/spec/functions/validate_ip_address_spec.rb
+++ b/spec/functions/validate_ip_address_spec.rb
@@ -22,7 +22,7 @@ describe 'validate_ip_address' do
it { is_expected.to run.with_params('fe80::a00:27ff:fe94:44d6/64') }
context 'Checking for deprecation warning', if: Puppet.version.to_f < 4.0 do
- after(:context) do
+ after(:all) do
ENV.delete('STDLIB_LOG_DEPRECATIONS')
end
# Checking for deprecation warning, which should only be provoked when the env variable for it is set.
diff --git a/spec/functions/validate_ipv4_address_spec.rb b/spec/functions/validate_ipv4_address_spec.rb
index b60dc8e..d221793 100755
--- a/spec/functions/validate_ipv4_address_spec.rb
+++ b/spec/functions/validate_ipv4_address_spec.rb
@@ -8,7 +8,7 @@ describe 'validate_ipv4_address' do
end
context 'Checking for deprecation warning', if: Puppet.version.to_f < 4.0 do
- after(:context) do
+ after(:all) do
ENV.delete('STDLIB_LOG_DEPRECATIONS')
end
# Checking for deprecation warning, which should only be provoked when the env variable for it is set.
diff --git a/spec/functions/validate_ipv6_address_spec.rb b/spec/functions/validate_ipv6_address_spec.rb
index 87b535e..78810d4 100755
--- a/spec/functions/validate_ipv6_address_spec.rb
+++ b/spec/functions/validate_ipv6_address_spec.rb
@@ -8,7 +8,7 @@ describe 'validate_ipv6_address' do
end
context 'Checking for deprecation warning', if: Puppet.version.to_f < 4.0 do
- after(:context) do
+ after(:all) do
ENV.delete('STDLIB_LOG_DEPRECATIONS')
end
# Checking for deprecation warning, which should only be provoked when the env variable for it is set.
diff --git a/spec/functions/validate_numeric_spec.rb b/spec/functions/validate_numeric_spec.rb
index 4a65649..4c0e24d 100755
--- a/spec/functions/validate_numeric_spec.rb
+++ b/spec/functions/validate_numeric_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe 'validate_numeric' do
- after(:context) do
+ after(:all) do
ENV.delete('STDLIB_LOG_DEPRECATIONS')
end
diff --git a/spec/functions/validate_re_spec.rb b/spec/functions/validate_re_spec.rb
index 2fa9ddd..3531182 100755
--- a/spec/functions/validate_re_spec.rb
+++ b/spec/functions/validate_re_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe 'validate_re' do
- after(:context) do
+ after(:all) do
ENV.delete('STDLIB_LOG_DEPRECATIONS')
end
diff --git a/spec/functions/validate_slength_spec.rb b/spec/functions/validate_slength_spec.rb
index 2ea253c..e4162de 100755
--- a/spec/functions/validate_slength_spec.rb
+++ b/spec/functions/validate_slength_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe 'validate_slength' do
- after(:context) do
+ after(:all) do
ENV.delete('STDLIB_LOG_DEPRECATIONS')
end
diff --git a/spec/functions/validate_string_spec.rb b/spec/functions/validate_string_spec.rb
index 45d6ffc..b5ce763 100755
--- a/spec/functions/validate_string_spec.rb
+++ b/spec/functions/validate_string_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe 'validate_string' do
- after(:context) do
+ after(:all) do
ENV.delete('STDLIB_LOG_DEPRECATIONS')
end