<commit_before>RSpec.describe MiqExpression::SubstMixin do
  let(:test_class) { Class.new { include MiqExpression::SubstMixin } }
  let(:test_obj) { test_class.new }

  describe "#exp_replace_qs_tokens" do
    it "removes :token key from passed expression" do
      exp = {"=" => {"field" => "Vm-active", "value" => "true"}, :token => 1}
      test_obj.exp_replace_qs_tokens(exp, {})
      expect(exp).to eq("=" => {"field" => "Vm-active", "value" => "true"})
    end
  end
end<commit_msg>use more complicated expression to test removal of temporary token<commit_after>RSpec.describe MiqExpression::SubstMixin do
  let(:test_class) { Class.new { include MiqExpression::SubstMixin } }
  let(:test_obj) { test_class.new }

  describe "#exp_replace_qs_tokens" do
    it "removes :token key from passed expression" do
      exp = {"and" => [{"=" => {"field" => "Vm-active", "value" => "true"}, :token => 1}, {"=" => {"field" => "Vm-archived", "value" => "true"}, :token => 2}]}
      test_obj.exp_replace_qs_tokens(exp, {})
      expect(exp).to eq("and" => [{"=" => {"field" => "Vm-active", "value" => "true"}}, {"=" => {"field" => "Vm-archived", "value" => "true"}}])
    end
  end
end
{'fraction_non_alphanumeric': 0.20642978003384094, 'fraction_numerical': 0.0025380710659898475, 'mean_word_length': 4.304932735426009, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 26, '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': '122833', 'n_tokens_mistral': 417, 'n_tokens_neox': 410, 'n_words': 93}