Sha256: 7773f49b9097b225b9d7c30a343de82fe30e5ff78be985f7d62631cec7d10034
Contents?: true
Size: 731 Bytes
Versions: 13
Compression:
Stored size: 731 Bytes
Contents
require File.dirname(__FILE__) + '/../test_helper' class SpecialContentTest < Test::Unit::TestCase include Ferret::Index include Ferret::Search fixtures :contents, :comments def setup ContentBase.rebuild_index Comment.rebuild_index end def test_class_index_dir assert SpecialContent.aaf_configuration[:index_dir] =~ %r{^#{RAILS_ROOT}/index/test/content_base} end def test_find_with_ferret contents_from_ferret = SpecialContent.find_with_ferret('single table') assert_equal 1, contents_from_ferret.size assert_equal ContentBase.find(3), contents_from_ferret.first contents_from_ferret = SpecialContent.find_with_ferret('title') assert contents_from_ferret.empty? end end
Version data entries
13 entries across 13 versions & 4 rubygems