<commit_before>require 'spec_helper'

describe User do
  let(:user) { build(:user) }

  describe "#valid?" do
    describe "password" do
      it "password != password_confirmation is invalid" do
        user.current_password = <PASSWORD>
        user.password = "<PASSWORD>"
        user.password_confirmation = "<PASSWORD>"
        user.should_not be_valid
      end
    end
  end
end<commit_msg>spec: Extract variables by `let`<commit_after>require 'spec_helper'

describe User do
  let(:user) { build(:user) }

  describe "#valid?" do
    describe "password" do
      before do
        user.current_password = <PASSWORD>
        user.password = password
        user.password_confirmation = <PASSWORD>
      end

      context 'when password != <PASSWORD>' do
        let(:current_password) { <PASSWORD> }
        let(:password) { '<PASSWORD>' }
        let(:password_confirmation) { '<PASSWORD>' }

        it 'should be false' do
          user.should_not be_valid
        end
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.10495049504950495, 'fraction_numerical': 0.0, 'mean_word_length': 2.597864768683274, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, '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': '5737137', 'n_tokens_mistral': 300, 'n_tokens_neox': 292, 'n_words': 79}