<commit_before>require 'spec_helper'

describe "real world edgecases", :realworld => true do
  # there is no rbx-relative-require gem that will install on 1.9
  it "ignores extra gems with bad platforms", :ruby => "1.8" do
    install_gemfile <<-G
      source :rubygems
      gem "linecache", "0.46"
    G
    expect(err).to eq("")
  end

  # https://github.com/bundler/bundler/issues/1202
  it "bundle cache works with rubygems 1.3.7 and pre gems", :ruby => "1.8" do
    install_gemfile <<-G
      source :rubygems
      gem "rack",          "1.3.0.beta2"
      gem "will_paginate", "3.0.pre2"
    G
    bundle :cache
    expect(out).not_to include("Removing outdated .gem files from vendor/cache")
  end

  # https://github.com/bundler/bundler/issues/1486
  # this is a hash collision that only manifests on 1.8.7
  it "finds the correct child versions", :ruby => "1.8" do
    install_gemfile <<-G
      source :rubygems

      gem 'i18n', '~> 0.6.0'
      gem 'activesupport', '~> 3.0'
      gem 'activerecord', '~> 3.0'
      gem 'builder', '~> 2.1.2'
    G
    expect(out).to include("activemodel 3.0.5")
  end<commit_msg>Don't change i18n version of Ruby 1.8 spec<commit_after>require 'spec_helper'

describe "real world edgecases", :realworld => true do
  # there is no rbx-relative-require gem that will install on 1.9
  it "ignores extra gems with bad platforms", :ruby => "1.8" do
    install_gemfile <<-G
      source :rubygems
      gem "linecache", "0.46"
    G
    expect(err).to eq("")
  end

  # https://github.com/bundler/bundler/issues/1202
  it "bundle cache works with rubygems 1.3.7 and pre gems", :ruby => "1.8" do
    install_gemfile <<-G
      source :rubygems
      gem "rack",          "1.3.0.beta2"
      gem "will_paginate", "3.0.pre2"
    G
    bundle :cache
    expect(out).not_to include("Removing outdated .gem files from vendor/cache")
  end

  # https://github.com/bundler/bundler/issues/1486
  # this is a hash collision that only manifests on 1.8.7
  it "finds the correct child versions", :ruby => "1.8" do
    install_gemfile <<-G
      source :rubygems

      gem 'i18n', '~> 0.4'
      gem 'activesupport', '~> 3.0'
      gem 'activerecord', '~> 3.0'
      gem 'builder', '~> 2.1.2'
    G
    expect(out).to include("activemodel 3.0.5")
  end
{'fraction_non_alphanumeric': 0.13885238720981166, 'fraction_numerical': 0.04248795444590451, 'mean_word_length': 2.6838709677419357, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 19, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6518260', 'n_tokens_mistral': 872, 'n_tokens_neox': 814, 'n_words': 238}