diff options
author | Xabier de Zuazo <xabier@onddo.com> | 2014-12-03 06:42:11 +0100 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2015-01-27 12:08:42 -0800 |
commit | ba4e1e49bc448008a6782d09f3368522f219ace4 (patch) | |
tree | 774edde72f25665b547f196afbf8b3f285803432 | |
parent | dbb472b31267bba8b8df888cb5901fa193792a10 (diff) | |
download | chef-ba4e1e49bc448008a6782d09f3368522f219ace4.tar.gz |
Clean all RSpec test filters related to Ruby 1.8.7 (issue #2497)
-rw-r--r-- | spec/integration/knife/download_spec.rb | 2 | ||||
-rw-r--r-- | spec/integration/solo/solo_spec.rb | 3 | ||||
-rw-r--r-- | spec/spec_helper.rb | 7 | ||||
-rw-r--r-- | spec/support/platform_helpers.rb | 12 | ||||
-rw-r--r-- | spec/unit/util/path_helper_spec.rb | 12 |
5 files changed, 5 insertions, 31 deletions
diff --git a/spec/integration/knife/download_spec.rb b/spec/integration/knife/download_spec.rb index cf1e4fcf0f..c87e6fe20a 100644 --- a/spec/integration/knife/download_spec.rb +++ b/spec/integration/knife/download_spec.rb @@ -1069,7 +1069,7 @@ EOM end when_the_repository 'is empty' do - it 'knife download /cookbooks/x signs all requests', :ruby_gte_19_only do + it 'knife download /cookbooks/x signs all requests' do # Check that BasicClient.request() always gets called with X-OPS-USERID original_new = Chef::HTTP::BasicClient.method(:new) diff --git a/spec/integration/solo/solo_spec.rb b/spec/integration/solo/solo_spec.rb index cc9ba1abb2..41f5f5506f 100644 --- a/spec/integration/solo/solo_spec.rb +++ b/spec/integration/solo/solo_spec.rb @@ -83,8 +83,7 @@ end EOM end - # Ruby 1.8.7 doesn't have Process.spawn :( - it "while running solo concurrently", :ruby_gte_19_only => true do + it "while running solo concurrently" do file 'config/solo.rb', <<EOM cookbook_path "#{path_to('cookbooks')}" file_cache_path "#{path_to('config/cache')}" diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 995be5060b..b87736efef 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -124,11 +124,7 @@ RSpec.configure do |config| config.filter_run_excluding :aix_only => true unless aix? config.filter_run_excluding :supports_cloexec => true unless supports_cloexec? config.filter_run_excluding :selinux_only => true unless selinux_enabled? - config.filter_run_excluding :ruby_18_only => true unless ruby_18? - config.filter_run_excluding :ruby_19_only => true unless ruby_19? - config.filter_run_excluding :ruby_gte_19_only => true unless ruby_gte_19? config.filter_run_excluding :ruby_20_only => true unless ruby_20? - config.filter_run_excluding :ruby_gte_20_only => true unless ruby_gte_20? # chef_gte_XX_only and chef_lt_XX_only pair up correctly with the same XX # number. please conserve this pattern & resist filling out all the operators config.filter_run_excluding :chef_gte_13_only => true unless chef_gte_13? @@ -137,9 +133,8 @@ RSpec.configure do |config| config.filter_run_excluding :requires_root_or_running_windows => true unless (root? || windows?) config.filter_run_excluding :requires_unprivileged_user => true if root? config.filter_run_excluding :uses_diff => true unless has_diff? - config.filter_run_excluding :ruby_gte_20_and_openssl_gte_101 => true unless (ruby_gte_20? && openssl_gte_101?) + config.filter_run_excluding :openssl_gte_101 => true unless openssl_gte_101? config.filter_run_excluding :openssl_lt_101 => true unless openssl_lt_101? - config.filter_run_excluding :ruby_lt_20 => true unless ruby_lt_20? config.filter_run_excluding :aes_256_gcm_only => true unless aes_256_gcm? config.filter_run_excluding :broken => true diff --git a/spec/support/platform_helpers.rb b/spec/support/platform_helpers.rb index 959580c953..a412fe38e1 100644 --- a/spec/support/platform_helpers.rb +++ b/spec/support/platform_helpers.rb @@ -6,10 +6,6 @@ class ShellHelpers extend Chef::Mixin::ShellOut end -def ruby_gte_20? - RUBY_VERSION.to_f >= 2.0 -end - def ruby_lt_20? !ruby_gte_20? end @@ -30,14 +26,6 @@ def ruby_20? !!(RUBY_VERSION =~ /^2.0/) end -def ruby_19? - !!(RUBY_VERSION =~ /^1.9/) -end - -def ruby_18? - !!(RUBY_VERSION =~ /^1.8/) -end - def windows? !!(RUBY_PLATFORM =~ /mswin|mingw|windows/) end diff --git a/spec/unit/util/path_helper_spec.rb b/spec/unit/util/path_helper_spec.rb index 4df4b9b1ff..5756c29b90 100644 --- a/spec/unit/util/path_helper_spec.rb +++ b/spec/unit/util/path_helper_spec.rb @@ -189,16 +189,8 @@ describe Chef::Util::PathHelper do end context "not on windows", :unix_only do - context "ruby is at least 1.9", :ruby_gte_19_only do - it "returns a canonical path" do - expect(PathHelper.canonical_path("/etc//apache.d/sites-enabled/../sites-available/default")).to eq("/etc/apache.d/sites-available/default") - end - end - - context "ruby is less than 1.9", :ruby_18_only do - it "returns a canonical path" do - expect { PathHelper.canonical_path("/etc//apache.d/sites-enabled/../sites-available/default") }.to raise_error(NotImplementedError) - end + it "returns a canonical path" do + expect(PathHelper.canonical_path("/etc//apache.d/sites-enabled/../sites-available/default")).to eq("/etc/apache.d/sites-available/default") end end end |