Skip to content

Commit

Permalink
Fix the specs on rubygems 1.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
indirect committed Jan 19, 2011
1 parent 4d6c3da commit e11fde0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion spec/other/help_spec.rb
@@ -1,7 +1,9 @@
require "spec_helper"

describe "bundle help" do
it "complains if older versions of bundler are installed" 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
system_gems "bundler-0.8.1"

bundle "help", :expect_err => true
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Expand Up @@ -26,7 +26,7 @@

Spec::Rubygems.setup
FileUtils.rm_rf(Spec::Path.gem_repo1)
ENV['RUBYOPT'] = "-I#{Spec::Path.root}/spec/support/rubygems_hax #{ENV['RUBYOPT']}"
ENV['RUBYOPT'] = "#{ENV['RUBYOPT']} -r#{Spec::Path.root}/spec/support/rubygems_hax/platform.rb"
ENV['BUNDLE_SPEC_RUN'] = "true"

RSpec.configure do |config|
Expand Down
@@ -1,3 +1,5 @@
require 'rubygems'

class Gem::Platform
@local = new(ENV['BUNDLER_SPEC_PLATFORM']) if ENV['BUNDLER_SPEC_PLATFORM']
end
Expand Down

0 comments on commit e11fde0

Please sign in to comment.