diff options
author | Andre Arko <andre@arko.net> | 2016-10-12 11:59:03 -0700 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2016-10-12 11:59:03 -0700 |
commit | 3a82c5fbf05230e2274b6cefe9f833e7275690e8 (patch) | |
tree | e1fbf37ee5fa7050f2aeeda2630473a9dba25cc3 | |
parent | 85bccc602d3e460f9f9e9e3f52f1ca935b03c67f (diff) | |
download | bundler-3a82c5fbf05230e2274b6cefe9f833e7275690e8.tar.gz |
use realworld versions in realworld tests
-rw-r--r-- | spec/realworld/edgecases_spec.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/spec/realworld/edgecases_spec.rb b/spec/realworld/edgecases_spec.rb index 06e588044c..6d01675e1f 100644 --- a/spec/realworld/edgecases_spec.rb +++ b/spec/realworld/edgecases_spec.rb @@ -2,6 +2,14 @@ require "spec_helper" describe "real world edgecases", :realworld => true, :sometimes => true do + def rubygems_version(name, requirement) + source = Bundler::Source::Rubygems::Remote.new(URI('https://rubygems.org')) + fetcher = Bundler::Fetcher.new(source) + index = fetcher.specs([name], nil) + rubygem = index.search(Gem::Dependency.new(name, requirement)).last + "#{name} (#{rubygem.version})" + end + # there is no rbx-relative-require gem that will install on 1.9 it "ignores extra gems with bad platforms", :ruby => "~> 1.8.7" do gemfile <<-G @@ -84,8 +92,8 @@ describe "real world edgecases", :realworld => true, :sometimes => true do gem "builder", "~> 2.1.2" G bundle :lock - expect(lockfile).to include("i18n (0.6.11)") - expect(lockfile).to include("activesupport (3.0.5)") + expect(lockfile).to include(rubygems_version("i18n", "~> 0.6.0")) + expect(lockfile).to include(rubygems_version("activesupport", "~> 3.0")) end # https://github.com/bundler/bundler/issues/1500 |