<commit_before>require 'test_helper'

module Slingshot

  class HighlightIntegrationTest < Test::Unit::TestCase
    include Test::Integration

    context "Highlight" do 

      should "add 'highlight' field to the result item" do
        Slingshot::Configuration.logger STDERR, :level => 'debug'
        s = Slingshot.search('articles-test') do
          # query { string '-w' }
          highlight :title
        end

        doc = s.results.first

        assert_equal 1, doc.highlight.title.size
        assert doc.highlight.title.to_s.include?('<em>'), "Highlight does not include default highlight tag"
      end

    end

  end
end
<commit_msg>[FIX] Removed overlooked logger tests from highlights test<commit_after>require 'test_helper'

module Slingshot

  class HighlightIntegrationTest < Test::Unit::TestCase
    include Test::Integration

    context "Highlight" do 

      should "add 'highlight' field to the result item" do
        # Slingshot::Configuration.logger STDERR, :level => 'debug'
        s = Slingshot.search('articles-test') do
          query { string 'Two' }
          highlight :title
        end

        doc = s.results.first

        assert_equal 1, doc.highlight.title.size
        assert doc.highlight.title.to_s.include?('<em>'), "Highlight does not include default highlight tag"
      end

    end

  end
end

{'fraction_non_alphanumeric': 0.09272997032640949, 'fraction_numerical': 0.001483679525222552, 'mean_word_length': 2.736842105263158, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '1346803', 'n_tokens_mistral': 398, 'n_tokens_neox': 365, 'n_words': 111}