<commit_before>#!/bin/sh

. test/helper.sh

function test_chruby_use()
{
	local ruby_root="/usr/local/ruby-1.9.3-p194"

	chruby_use $ruby_root

	assertEquals "invalid RUBY" "$ruby_root" "$RUBY"
	assertEquals "invalid RUBY_ENGINE"  "ruby" "$RUBY_ENGINE"
	assertEquals "invalid RUBY_VERSION" "1.9.3" "$RUBY_VERSION"
	assertEquals "invalid GEM_HOME" "$HOME/.gem/$RUBY_ENGINE/$RUBY_VERSION" "$GEM_HOME"
	assertEquals "invalid GEM_PATH" "$HOME/.gem/$RUBY_ENGINE/$RUBY_VERSION:$RUBY/lib/ruby/gems/1.9.1" "$GEM_PATH"

	assertEquals "could not find ruby in $PATH" "$ruby_root/bin/ruby" `which ruby`
}<commit_msg>Improved chruby_use test.<commit_after>#!/bin/sh

. test/helper.sh

function test_chruby_use()
{
	local ruby_root="/usr/local/ruby-1.9.3-p194"

	chruby_use $ruby_root

	assertEquals "invalid RUBY" "$ruby_root" "$RUBY"
	assertEquals "invalid RUBY_ENGINE"  "ruby" "$RUBY_ENGINE"
	assertEquals "invalid RUBY_VERSION" "1.9.3" "$RUBY_VERSION"
	assertEquals "invalid GEM_ROOT" "$RUBY/lib/ruby/gems/1.9.1" "$GEM_ROOT"
	assertEquals "invalid GEM_HOME" "$HOME/.gem/$RUBY_ENGINE/$RUBY_VERSION" "$GEM_HOME"
	assertEquals "invalid GEM_PATH" "$GEM_HOME:$GEM_ROOT" "$GEM_PATH"

	assertEquals "could not find ruby in $PATH" "$ruby_root/bin/ruby" `which ruby`
}
{'fraction_non_alphanumeric': 0.1545236188951161, 'fraction_numerical': 0.01921537229783827, 'mean_word_length': 5.793478260869565, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3914665', 'n_tokens_mistral': 554, 'n_tokens_neox': 483, 'n_words': 93}