<commit_before>require 'test_helper'

class CommitTest < ActiveSupport::TestCase
  setup do
    @commit = commits(:rails_commit)
  end

  test ".merge_or_skip_ci? for merge commits" do
    @commit.message = CommitReviewer::MERGE_COMMIT_MESSAGE
    assert_equal true, Commit.merge_or_skip_ci?(@commit.message)
  end

  test ".merge_or_skip_ci? for ci skip commits" do
    @commit.message = CommitReviewer::CI_SKIP_COMMIT_MESSAGE
    assert_equal true, Commit.merge_or_skip_ci?(@commit.message)

    @commit.message = CommitReviewer::SKIP_CI_COMMIT_MESSAGE
    assert_equal true, Commit.merge_or_skip_ci?(@commit.message)
  end<commit_msg>Remove redundant setup in tests.<commit_after>require 'test_helper'

class CommitTest < ActiveSupport::TestCase
  test ".merge_or_skip_ci? for merge commits" do
    assert_equal true, Commit.merge_or_skip_ci?(CommitReviewer::MERGE_COMMIT_MESSAGE)
    assert_equal false, Commit.merge_or_skip_ci?('haha')
  end

  test ".merge_or_skip_ci? for ci skip commits" do
    assert_equal true, Commit.merge_or_skip_ci?(CommitReviewer::CI_SKIP_COMMIT_MESSAGE)
    assert_equal true, Commit.merge_or_skip_ci?(CommitReviewer::SKIP_CI_COMMIT_MESSAGE)
  end
{'fraction_non_alphanumeric': 0.08644067796610169, 'fraction_numerical': 0.0, 'mean_word_length': 5.988165680473373, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '4595905', 'n_tokens_mistral': 403, 'n_tokens_neox': 388, 'n_words': 75}