ontology_search_test.rb revision c0db3f29bc01c8d672cf19648b1172dd8d21d2d4
require 'test_helper'
context 'OntologySearch' do
setup do
@ontologies.map(&:save)
@entities.map(&:save)
@logics.map(&:save)
@keywords = []
end
teardown do
end
#context 'keyword list' do
# should 'be generated correctly for ontologies' do
# @ontologies.each do |o|
# (0..(o.name.size-1)).each do |i|
# results = @os.make_global_keyword_list prefix
#
# assert results.size != 0
#
# results.each do |result|
# assert result[:text].downcase.starts_with? prefix.downcase
# end
#
# assert results.map { |x| x[:text] }.include? o.name
# end
# end
# end
# should 'be generated correctly for entities' do
# @entities.each do |e|
# (0..(e.name.size-1)).each do |i|
# results = @os.make_global_keyword_list prefix
#
# assert results.size != 0
#
# results.each do |result|
# assert result[:text].downcase.starts_with? prefix.downcase
# end
#
# assert results.map { |x| x[:text] }.include? e.name
# end
# end
# end
#
# should 'be generated correctly for logics' do
# @logics.each do |l|
# (0..(l.name.size-1)).each do |i|
# results = @os.make_global_keyword_list prefix
#
# assert results.size != 0
#
# results.each do |result|
# assert result[:text].downcase.starts_with? prefix.downcase
# end
#
# assert results.map { |x| x[:text] }.include? l.name
# end
# end
# end
#end
context 'bean list' do
context 'with one keyword' do
should 'be generated correctly' do
@ontologies.each do |o|
end
end
end
results = results.map { |x| x[:name] }
end
results = results.map { |x| x[:name] }
end
end
end
end
end