<commit_before>require 'spec_helper'

describe 'minimum2scp/ruby-full' do
  context 'with env [APT_LINE=keep]' do
    before(:all) do
      start_container({
        'Image' => ENV['DOCKER_IMAGE'] || "minimum2scp/#{File.basename(__dir__)}:latest",
        'Env' => [ 'APT_LINE=keep' ]
      })
    end

    after(:all) do
      stop_container
    end

    #Dir["#{__dir__}/../ruby/*_spec.rb"].sort.each do |spec|
    #  load spec
    #end

    [
      [ '2.2.3',      'ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux]' ],
      [ '2.1.7',      'ruby 2.1.7p400 (2015-08-18 revision 51632) [x86_64-linux]' ],
      [ '2.0.0-p647', 'ruby 2.0.0p647 (2015-08-18 revision 51631) [x86_64-linux]' ]
    ].each do |dir, version|
      describe file("/opt/rbenv/versions/#{dir}") do
        it { should be_directory }
      end

      describe command("/opt/rbenv/versions/#{dir}/bin/ruby -v") do
        its(:stdout) { should include version }
      end

      describe command("/opt/rbenv/versions/#{dir}/bin/gem list") do
        its(:stdout) { should match /^bundler / }
        its(:stdout) { should match /^pry / }
      end
    end

    %w[ruby2.2 ruby2.2-dev].each do |pkg|
      describe package(pkg) do
        it { should be_installed }
      end
    end

    describe command('ruby2.2 -v') do
      its(:stdout) { should include 'ruby 2.2.2p95 (2015-04-13) [x86_64-linux-gnu]'}
    end
  end
end<commit_msg>fixed ruby-full spec (debian ruby2.2 package has been updated)<commit_after>require 'spec_helper'

describe 'minimum2scp/ruby-full' do
  context 'with env [APT_LINE=keep]' do
    before(:all) do
      start_container({
        'Image' => ENV['DOCKER_IMAGE'] || "minimum2scp/#{File.basename(__dir__)}:latest",
        'Env' => [ 'APT_LINE=keep' ]
      })
    end

    after(:all) do
      stop_container
    end

    #Dir["#{__dir__}/../ruby/*_spec.rb"].sort.each do |spec|
    #  load spec
    #end

    [
      [ '2.2.3',      'ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux]' ],
      [ '2.1.7',      'ruby 2.1.7p400 (2015-08-18 revision 51632) [x86_64-linux]' ],
      [ '2.0.0-p647', 'ruby 2.0.0p647 (2015-08-18 revision 51631) [x86_64-linux]' ]
    ].each do |dir, version|
      describe file("/opt/rbenv/versions/#{dir}") do
        it { should be_directory }
      end

      describe command("/opt/rbenv/versions/#{dir}/bin/ruby -v") do
        its(:stdout) { should include version }
      end

      describe command("/opt/rbenv/versions/#{dir}/bin/gem list") do
        its(:stdout) { should match /^bundler / }
        its(:stdout) { should match /^pry / }
      end
    end

    %w[ruby2.2 ruby2.2-dev].each do |pkg|
      describe package(pkg) do
        it { should be_installed }
      end
    end

    describe command('ruby2.2 -v') do
      its(:stdout) { should include 'ruby 2.2.3p173 (2015-08-18) [x86_64-linux-gnu]'}
    end
  end
end
{'fraction_non_alphanumeric': 0.16424116424116425, 'fraction_numerical': 0.07449757449757449, 'mean_word_length': 2.3222094361334866, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, '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': '5911963', 'n_tokens_mistral': 1214, 'n_tokens_neox': 1056, 'n_words': 227}