require "#{File.dirname(__FILE__)}/../test_helper" describe EnrichmentDb::Language::Datum do it 'should retrieve correct record' do table_name = 'Electronics_Brands' schema_name = 'arabic' result = EnrichmentDb::Language::Datum.all(table_name, schema_name) test_result = result.keys.first expecting = 'Acer' assert_equal expecting, test_result end it 'should retrieve correct record via a lambda' do table_name = 'location_countries' schema_name = 'bio' value = 'Australia' lambda = "value = '#{value}'" result = EnrichmentDb::Language::Datum.by_lambda(schema_name, table_name, lambda) test_result = result.keys.first expecting = 'Australia' assert_equal expecting, test_result end end