<commit_before>require 'spec_helper'
include GitStatistics

describe Commit do

  let(:sha) { "bf09a64b0e0f801d3e7fe4e002cbd1bf517340a7" }
  let(:repo) { Utilities.get_repository }
  subject(:commit) { Commit.new(repo.commit(sha)) }

  its(:__getobj__) { should be_a Grit::Commit }

  context "without a merge" do
    its(:merge?) { should be_false }
  end

  context "with a merge" do
    let(:sha) { "9d31467f6759c92f8535038c470d24a37ae93a9d" }
    its(:merge?) { should be_true }
  end

  context "net, additions, and deletions" do<commit_msg>Use Rspec predicate matcher syntax<commit_after>require 'spec_helper'
include GitStatistics

describe Commit do

  let(:sha) { "bf09a64b0e0f801d3e7fe4e002cbd1bf517340a7" }
  let(:repo) { Utilities.get_repository }
  subject(:commit) { Commit.new(repo.commit(sha)) }

  its(:__getobj__) { should be_a Grit::Commit }

  context "without a merge" do
    it { should_not be_a_merge }
  end

  context "with a merge" do
    let(:sha) { "9d31467f6759c92f8535038c470d24a37ae93a9d" }
    it { should be_a_merge }
  end

  context "net, additions, and deletions" do
{'fraction_non_alphanumeric': 0.10707803992740472, 'fraction_numerical': 0.09437386569872959, 'mean_word_length': 4.656410256410257, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2182331', 'n_tokens_mistral': 480, 'n_tokens_neox': 416, 'n_words': 89}