summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThe Bundler Bot <bot@bundler.io>2017-01-19 05:33:30 +0000
committerThe Bundler Bot <bot@bundler.io>2017-01-19 05:33:30 +0000
commit1f9a875727fea63a1f839a6e980edad90762a3f7 (patch)
treeea677f5e77c1fbbe6c9253cc534644bf0fc194d6
parent01d22f047102db76cfc987eec2ca6c3bcf1456e5 (diff)
parentfd2fb687e329788e1261d3b034c2839ae2c0f5fa (diff)
downloadbundler-1f9a875727fea63a1f839a6e980edad90762a3f7.tar.gz
Auto merge of #5333 - bundler:seg-test-conditionals, r=segiddins
Use rubygems conditional for specs Also allows us to delete a rubocop todo
-rw-r--r--.rubocop_todo.yml8
-rw-r--r--spec/commands/help_spec.rb3
-rw-r--r--spec/other/ext_spec.rb6
3 files changed, 3 insertions, 14 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index 10d9e58fa5..fd3dce32f2 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -328,11 +328,3 @@ Style/UnneededInterpolation:
- 'spec/bundler/shared_helpers_spec.rb'
- 'spec/cache/git_spec.rb'
- 'spec/commands/exec_spec.rb'
-
-# Offense count: 2
-# Configuration parameters: EnforcedStyle, SupportedStyles.
-# SupportedStyles: snake_case, normalcase, non_integer
-Style/VariableNumber:
- Exclude:
- - 'spec/commands/help_spec.rb'
- - 'spec/other/ext_spec.rb'
diff --git a/spec/commands/help_spec.rb b/spec/commands/help_spec.rb
index 017c53cfd8..7789fe40b9 100644
--- a/spec/commands/help_spec.rb
+++ b/spec/commands/help_spec.rb
@@ -3,8 +3,7 @@ require "spec_helper"
RSpec.describe "bundle help" do
# Rubygems 1.4+ no longer load gem plugins so this test is no longer needed
- rubygems_under_14 = Gem::Requirement.new("< 1.4").satisfied_by?(Gem::Version.new(Gem::VERSION))
- it "complains if older versions of bundler are installed", :if => rubygems_under_14 do
+ it "complains if older versions of bundler are installed", :rubygems => "< 1.4" do
system_gems "bundler-0.8.1"
bundle "help"
diff --git a/spec/other/ext_spec.rb b/spec/other/ext_spec.rb
index 9aed37adfd..2d6ab941b8 100644
--- a/spec/other/ext_spec.rb
+++ b/spec/other/ext_spec.rb
@@ -48,8 +48,6 @@ RSpec.describe "Bundler::GemHelpers#generic" do
end
RSpec.describe "Gem::SourceIndex#refresh!" do
- rubygems_1_7 = Gem::Version.new(Gem::VERSION) >= Gem::Version.new("1.7.0")
-
before do
install_gemfile <<-G
source "file://#{gem_repo1}"
@@ -57,12 +55,12 @@ RSpec.describe "Gem::SourceIndex#refresh!" do
G
end
- it "does not explode when called", :if => rubygems_1_7 do
+ it "does not explode when called", :rubygems => "1.7" do
run "Gem.source_index.refresh!"
run "Gem::SourceIndex.new([]).refresh!"
end
- it "does not explode when called", :unless => rubygems_1_7 do
+ it "does not explode when called", :rubygems => "< 1.7" do
run "Gem.source_index.refresh!"
run "Gem::SourceIndex.from_gems_in([]).refresh!"
end