summaryrefslogtreecommitdiff
path: root/spec/install/gemfile/ruby_spec.rb
blob: 9b35e3819c2aa3c92412aebeccc506aa43c3ff8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
require "spec_helper"

describe "ruby requirement" do
  # As discovered by https://github.com/bundler/bundler/issues/4147, there is
  # no test coverage to ensure that adding a gem is possible with a ruby
  # requirement. This test verifies the fix, committed in bfbad5c5.
  it "allows adding gems" do
    install_gemfile <<-G
      source "file://#{gem_repo1}"
      ruby "#{RUBY_VERSION}"
      gem "rack"
    G

    install_gemfile <<-G
      source "file://#{gem_repo1}"
      ruby "#{RUBY_VERSION}"
      gem "rack"
      gem "rack-obama"
    G

    expect(exitstatus).to eq(0) if exitstatus
    should_be_installed "rack-obama 1.0"
  end
end