<commit_before>require 'spec_helper'

module InitializeWithAttrsSpec
  class Book
    include InitializeWithAttrs
    attr_accessor :pages
  end
end

describe InitializeWithAttrsSpec::Book, "initialized with attribute Hash" do
  subject { InitializeWithAttrsSpec::Book.new(:pages => pages) }
  let(:pages) { 123 }

  describe '#pages' do
    subject { super().pages }
    it { is_expected.to eq(pages) }
  end
end<commit_msg>Favor named subject instead of using super in a nested context<commit_after>require 'spec_helper'

module InitializeWithAttrsSpec
  class Book
    include InitializeWithAttrs
    attr_accessor :pages
  end
end

describe InitializeWithAttrsSpec::Book, "initialized with attribute Hash" do
  subject(:book) { InitializeWithAttrsSpec::Book.new(:pages => pages) }
  let(:pages) { 123 }

  describe '#pages' do
    subject { book.pages }
    it { is_expected.to eq(pages) }
  end
end
{'fraction_non_alphanumeric': 0.08748615725359911, 'fraction_numerical': 0.006644518272425249, 'mean_word_length': 4.54601226993865, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '4534841', 'n_tokens_mistral': 277, 'n_tokens_neox': 268, 'n_words': 77}