<commit_before>require 'test_helper'

class UnitTest < ActiveSupport::TestCase

	assert_should_behave_like_a_hash

	assert_should_create_default_object
	assert_should_act_as_list
	assert_should_have_many( :aliquots, :samples )
#	assert_should_belong_to( :context )
	assert_should_not_require_attributes( :position, :context_id )

	test "unit factory should create unit" do
		assert_difference('Unit.count',1) {
			unit = FactoryGirl.create(:unit)
			assert_match /Key\d*/, unit.key
			assert_match /Desc\d*/, unit.description
		}
	end

protected

	#	create_object is called from within the common class tests
	alias_method :create_object, :create_unit

end<commit_msg>Finished removing contexts and context_contextables.[#419]<commit_after>require 'test_helper'

class UnitTest < ActiveSupport::TestCase

	assert_should_behave_like_a_hash

	assert_should_create_default_object
	assert_should_act_as_list
	assert_should_have_many( :aliquots, :samples )
	assert_should_not_require_attributes( :position )

	test "unit factory should create unit" do
		assert_difference('Unit.count',1) {
			unit = FactoryGirl.create(:unit)
			assert_match /Key\d*/, unit.key
			assert_match /Desc\d*/, unit.description
		}
	end

protected

	#	create_object is called from within the common class tests
	alias_method :create_object, :create_unit

end
{'fraction_non_alphanumeric': 0.07819548872180451, 'fraction_numerical': 0.0037593984962406013, 'mean_word_length': 6.042328042328043, 'pattern_counts': {'":': 0, '<': 5, '<?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': '884628', 'n_tokens_mistral': 457, 'n_tokens_neox': 425, 'n_words': 94}