Skip to content

Commit

Permalink
Add tests demonstrating issue rubygems#2774
Browse files Browse the repository at this point in the history
  • Loading branch information
mvz committed May 10, 2014
1 parent 90b1ca4 commit a2c291c
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions spec/install/gems/platform_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,32 @@
expect(exitstatus).to eq(0)
end

it "does not attempt to install gems from :rbx when using --local" do
simulate_platform "ruby"
simulate_ruby_engine "ruby"

gemfile <<-G
source "file://#{gem_repo1}"
gem "some_gem", platform: :rbx
G

bundle "install --local"
expect(out).not_to match(/Could not find gem 'some_gem/)
end

it "does not attempt to install gems from other rubies when using --local" do
simulate_platform "ruby"
simulate_ruby_engine "ruby"
other_ruby_version_tag = RUBY_VERSION =~ /^1\.8/ ? :ruby_19 : :ruby_18

gemfile <<-G
source "file://#{gem_repo1}"
gem "some_gem", platform: :#{other_ruby_version_tag}
G

bundle "install --local"
expect(out).not_to match(/Could not find gem 'some_gem/)
end
end

describe "when a gem has no architecture" do
Expand Down

0 comments on commit a2c291c

Please sign in to comment.