<commit_before>describe Rubicure::Girl do
  describe "#name" do
    let(:girl){
      Rubicure::Girl.new(
          human_name:        human_name,
          precure_name:      precure_name,
          extra_names:       extra_names,
          transform_message: transform_message
      )
    }

    let(:human_name)     { "黄瀬やよい" }
    let(:precure_name)   { "キュアピース" }
    let(:extra_names)    { %w(プリンセスピース ウルトラピース) }
    let(:transform_message){
      <<EOF
プリキュアスマイルチャージ！
GO! GO! Let's GO ピース！
ピカピカピカリンジャンケンポン！ キュアピース！
EOF
    }

    context "when before transform" do
      it{ expect(girl.name).to eq human_name }
    end

    context "when after 1st transform" do
      before do
        girl.transform!
      end

      it{ expect(girl.name).to eq precure_name }
    end

    context "when after 2nd transform" do
      before do
        girl.transform!
        girl.transform!
      end

      it{ expect(girl.name).to eq extra_names[0] }
    end

    context "when after 3nd transform" do
      before do
        girl.transform!
        girl.transform!
        girl.transform!
      end

      it{ expect(girl.name).to eq extra_names[1] }
    end

    context "when after final transform" do
      before do
        girl.transform!
        girl.transform!
        girl.transform!
        girl.transform!
      end

      # return to human
      it{ expect(girl.name).to eq human_name }
    end
  end

  describe "#==" do
    let(:girl){
      Rubicure::Girl.new(
          human_name:        human_name,
          precure_name:      precure_name,
          extra_names:       extra_names,
          transform_message: transform_message
      )
    }

    let(:human_name)     { "黄瀬やよい" }
    let(:precure_name)   { "キュアピース" }
    let(:extra_names)    { %w(プリンセスピース ウルトラピース) }
    let(:transform_message){
      <<EOF
プリキュアスマイルチャージ！
GO! GO! Let's GO ピース！
ピカピカピカリンジャンケンポン！ キュアピース！
EOF
    }

    context "same object" do
      subject{ girl == girl }
      it{ should be true }
    end

    context "copied object" do
      subject{ girl == copied_girl }
      let(:copied_girl){ girl.dup }
      it{ should be true }
    end

    context "precure and human" do
      subject{ girl == transformed_girl }
      let(:transformed_girl){ girl.dup.transform! }
      it{ expect(girl.name).not_to eq transformed_girl.name }
      it{ should be true }
    end

    context "other precure" do
      subject{ girl == other_girl }
      let(:other_girl){ Rubicure::Girl.find(:passion) }<commit_msg>DRY :golf:<commit_after>describe Rubicure::Girl do
  let(:girl){
    Rubicure::Girl.new(
        human_name:        human_name,
        precure_name:      precure_name,
        extra_names:       extra_names,
        transform_message: transform_message
    )
  }

  let(:human_name)     { "黄瀬やよい" }
  let(:precure_name)   { "キュアピース" }
  let(:extra_names)    { %w(プリンセスピース ウルトラピース) }
  let(:transform_message){
    <<EOF
プリキュアスマイルチャージ！
GO! GO! Let's GO ピース！
ピカピカピカリンジャンケンポン！ キュアピース！
EOF
  }

  describe "#name" do
    context "when before transform" do
      it{ expect(girl.name).to eq human_name }
    end

    context "when after 1st transform" do
      before do
        girl.transform!
      end

      it{ expect(girl.name).to eq precure_name }
    end

    context "when after 2nd transform" do
      before do
        girl.transform!
        girl.transform!
      end

      it{ expect(girl.name).to eq extra_names[0] }
    end

    context "when after 3nd transform" do
      before do
        girl.transform!
        girl.transform!
        girl.transform!
      end

      it{ expect(girl.name).to eq extra_names[1] }
    end

    context "when after final transform" do
      before do
        girl.transform!
        girl.transform!
        girl.transform!
        girl.transform!
      end

      # return to human
      it{ expect(girl.name).to eq human_name }
    end
  end

  describe "#==" do
    subject{ girl == other_girl }

    context "same object" do
      let(:other_girl){ girl }
      it{ should be true }
    end

    context "copied object" do
      let(:other_girl){ girl.dup }
      it{ should be true }
    end

    context "precure and human" do
      let(:transformed_girl){ girl.dup.transform! }
      let(:other_girl){ transformed_girl }

      it{ expect(girl.name).not_to eq transformed_girl.name }
      it{ should be true }
    end

    context "other precure" do
      let(:other_girl){ Rubicure::Girl.find(:passion) }
{'fraction_non_alphanumeric': 0.09856308935788055, 'fraction_numerical': 0.00224517287831163, 'mean_word_length': 2.1153846153846154, 'pattern_counts': {'":': 0, '<': 9, '<?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': '6391597', 'n_tokens_mistral': 1582, 'n_tokens_neox': 1553, 'n_words': 364}