<commit_before>require 'cube_solver/cube'

describe CubeSolver::Cube do
  subject { described_class.new state }

  let(:state) { solved_state }

  let(:solved_state) { CubeSolver::Cube::SOLVED_STATE.join ' ' }

  it 'is initialized with a state' do
    expect(subject.state).to eq state
  end

  describe '==' do
    it 'returns true when two cubes have the same state' do
      expect(subject).to eq described_class.new(state)
    end

    it 'returns false when two cubes do not have the same state' do
      expect(subject).to_not eq described_class.new(state).d
    end
  end

  describe '#edges' do
    it 'returns all the edges' do
      expect(subject.edges).to eq(
        state.split[0..11].map { |cubie| CubeSolver::Cubie.new cubie }
      )
    end
  end

  describe '#corners' do
    it 'returns all the corners' do
      expect(subject.corners).to eq(
        state.split[12..-1].map { |cubie| CubeSolver::Cubie.new cubie }
      )
    end
  end

  describe '#solved?' do
    it 'returns true when cube is solved' do
      expect(subject.solved?).to be_true
    end

    it 'returns false when cube is not solved' do
      subject.l
      expect(subject.solved?).to be_false
    end
  end
<commit_msg>Use RSpec-isms for testing Cube#solved?<commit_after>require 'cube_solver/cube'

describe CubeSolver::Cube do
  subject { described_class.new state }

  let(:state) { solved_state }

  let(:solved_state) { CubeSolver::Cube::SOLVED_STATE.join ' ' }

  it 'is initialized with a state' do
    expect(subject.state).to eq state
  end

  describe '==' do
    it 'returns true when two cubes have the same state' do
      expect(subject).to eq described_class.new(state)
    end

    it 'returns false when two cubes do not have the same state' do
      expect(subject).to_not eq described_class.new(state).d
    end
  end

  describe '#edges' do
    it 'returns all the edges' do
      expect(subject.edges).to eq(
        state.split[0..11].map { |cubie| CubeSolver::Cubie.new cubie }
      )
    end
  end

  describe '#corners' do
    it 'returns all the corners' do
      expect(subject.corners).to eq(
        state.split[12..-1].map { |cubie| CubeSolver::Cubie.new cubie }
      )
    end
  end

  describe '#solved?' do
    it 'returns true when cube is solved' do
      expect(subject).to be_solved
    end

    it 'returns false when cube is not solved' do
      subject.l
      expect(subject).to_not be_solved
    end
  end

{'fraction_non_alphanumeric': 0.10020449897750511, 'fraction_numerical': 0.0049079754601227, 'mean_word_length': 2.763076923076923, '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': '335885', 'n_tokens_mistral': 847, 'n_tokens_neox': 806, 'n_words': 244}