<commit_before>require 'spec_helper'

describe Octave do
  describe '.get' do
    it 'returns an instance when given an octave number' do
      expect(Octave.get(4)).to eq 4
      expect(Octave.get(-1)).to eq -1
      expect(Octave.get(10)).to eq 10
      expect(Octave.get('5')).to eq 5
    end

    it 'falls back to 4' do
      expect(Octave.get('foo')).to eq 4
      expect(Octave.get(1.5)).to eq 4
      expect(Octave.get(15)).to eq 4
    end

    context 'when given an instance' do
      let(:instance) { described_class.get(4) }

      it 'returns that instance' do
        expect(described_class.get(instance)).to be instance
      end
    end
  end

  describe '.new' do
    it 'is private' do
      expect { Octave.new(5) }.to raise_error
    end<commit_msg>Specific exception class to eliminate warning.<commit_after>require 'spec_helper'

describe Octave do
  describe '.get' do
    it 'returns an instance when given an octave number' do
      expect(Octave.get(4)).to eq 4
      expect(Octave.get(-1)).to eq -1
      expect(Octave.get(10)).to eq 10
      expect(Octave.get('5')).to eq 5
    end

    it 'falls back to 4' do
      expect(Octave.get('foo')).to eq 4
      expect(Octave.get(1.5)).to eq 4
      expect(Octave.get(15)).to eq 4
    end

    context 'when given an instance' do
      let(:instance) { described_class.get(4) }

      it 'returns that instance' do
        expect(described_class.get(instance)).to be instance
      end
    end
  end

  describe '.new' do
    it 'is private' do
      expect { Octave.new(5) }.to raise_error NoMethodError
    end
{'fraction_non_alphanumeric': 0.11419558359621451, 'fraction_numerical': 0.025236593059936908, 'mean_word_length': 2.5244444444444443, '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': '6050958', 'n_tokens_mistral': 548, 'n_tokens_neox': 518, 'n_words': 161}