Sha256: 7c1acf34d79ada6d149c52fbee92a7631cb0f27bf6507b7779f7c970a18061af

Contents?: true

Size: 696 Bytes

Versions: 1

Compression:

Stored size: 696 Bytes

Contents

require_relative '../../spec_helper'
require_lib 'reek/smells/smell_detector'
require_lib 'reek/smells/smell_repository'

RSpec.describe Reek::Smells::SmellRepository do
  describe '.smell_types' do
    let(:smell_types) { described_class.smell_types }

    it 'includes existing smell_types' do
      expect(smell_types).to include(Reek::Smells::IrresponsibleModule).
        and include(Reek::Smells::TooManyStatements)
    end

    it 'excludes the smell detector base class' do
      expect(smell_types).not_to include(Reek::Smells::SmellDetector)
    end

    it 'returns the smell types in alphabetic order' do
      expect(smell_types).to eq(smell_types.sort_by(&:name))
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
reek-4.4.2 spec/reek/smells/smell_repository_spec.rb