<commit_before>require_relative '../lib/diagnostic.rb'

RSpec.describe 'Person' do
  let(:name) { 'Jeff' }
  let(:age) { 29 }
  let(:location) { 'Boston' }

  subject(:jeff) { Person.new(name, age, location) }

  it 'is a person' do
    expect(subject).to be_a(Person)
  end

  it 'has required attributes' do
    expect(subject.instance_variables).to include(:@name)
    expect(subject.instance_variables).to include(:@age)
    expect(subject.instance_variables).to include(:@location)
  end

  it 'has getters for name and age' do
    expect { subject.name }.not_to raise_error
    expect { subject.age }.not_to raise_error
  end

  it 'has setters for name and location' do
    expect { subject.name = 'Matt' }.not_to raise_error
    expect { subject.location = 'Cambridge' }.not_to raise_error
  end

  it 'has no setter for age' do
    expect { subject.age = 30 }.to raise_error(NoMethodError)
  end

  it 'has no getter for location' do
    expect { subject.location }.to raise_error(NoMethodError)
  end
end

RSpec.describe 'Developer' do
  let(:name) { 'Jeff' }
  let(:age) { 29 }
  let(:location) { 'Boston' }

  subject(:jeff) { Developer.new(name, age, location) }

  it 'is a person' do
    expect(subject).to be_a(Developer)
    expect(subject).to be_a(Person)
  end

  it 'has required attributes' do
    expect(subject.instance_variables).to include(:@name)
    expect(subject.instance_variables).to include(:@age)
    expect(subject.instance_variables).to include(:@location)
  end

  it 'has .solve_problems' do
    expect { subject.solve_problems }.not_to raise_error
  end

  describe '.solve_problems' do
    it 'returns "think think think"' do
      expect(subject.solve_problems).to eq('think think think')
    end
  end
end

RSpec.describe 'Lion' do
  subject(:leo) { Lion.new }

  it 'has .groom' do
    expect { subject.groom }.not_to raise_error
  end

  it 'has .can_eat_meat?' do
    expect { subject.can_eat_meat? }.not_to raise_error
  end

  it 'has .roar' do
    expect { subject.groom }.not_to raise_error
  end

  describe '.roar' do
    it 'prints out "ROAR"' do
      expect { subject.roar }.to output("ROAR\n").to_stdout
    end
  end
end<commit_msg>Fix test looking for ROAR!<commit_after>require_relative '../lib/diagnostic.rb'

RSpec.describe 'Person' do
  let(:name) { 'Jeff' }
  let(:age) { 29 }
  let(:location) { 'Boston' }

  subject(:jeff) { Person.new(name, age, location) }

  it 'is a person' do
    expect(subject).to be_a(Person)
  end

  it 'has required attributes' do
    expect(subject.instance_variables).to include(:@name)
    expect(subject.instance_variables).to include(:@age)
    expect(subject.instance_variables).to include(:@location)
  end

  it 'has getters for name and age' do
    expect { subject.name }.not_to raise_error
    expect { subject.age }.not_to raise_error
  end

  it 'has setters for name and location' do
    expect { subject.name = 'Matt' }.not_to raise_error
    expect { subject.location = 'Cambridge' }.not_to raise_error
  end

  it 'has no setter for age' do
    expect { subject.age = 30 }.to raise_error(NoMethodError)
  end

  it 'has no getter for location' do
    expect { subject.location }.to raise_error(NoMethodError)
  end
end

RSpec.describe 'Developer' do
  let(:name) { 'Jeff' }
  let(:age) { 29 }
  let(:location) { 'Boston' }

  subject(:jeff) { Developer.new(name, age, location) }

  it 'is a person' do
    expect(subject).to be_a(Developer)
    expect(subject).to be_a(Person)
  end

  it 'has required attributes' do
    expect(subject.instance_variables).to include(:@name)
    expect(subject.instance_variables).to include(:@age)
    expect(subject.instance_variables).to include(:@location)
  end

  it 'has .solve_problems' do
    expect { subject.solve_problems }.not_to raise_error
  end

  describe '.solve_problems' do
    it 'returns "think think think"' do
      expect(subject.solve_problems).to eq('think think think')
    end
  end
end

RSpec.describe 'Lion' do
  subject(:leo) { Lion.new }

  it 'has .groom' do
    expect { subject.groom }.not_to raise_error
  end

  it 'has .can_eat_meat?' do
    expect { subject.can_eat_meat? }.not_to raise_error
  end

  it 'has .roar' do
    expect { subject.groom }.not_to raise_error
  end

  describe '.roar' do
    it 'prints out "ROAR"' do
      expect { subject.roar }.to output("ROAR!\n").to_stdout
    end
  end
end
{'fraction_non_alphanumeric': 0.11850501367365543, 'fraction_numerical': 0.0027347310847766638, 'mean_word_length': 3.4558375634517766, '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': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3065197', 'n_tokens_mistral': 1583, 'n_tokens_neox': 1492, 'n_words': 411}