Sha256: 74185cd1cd595569081e4f3073b740bf2821542ec6e8186e2b3689301944082a

Contents?: true

Size: 715 Bytes

Versions: 17

Compression:

Stored size: 715 Bytes

Contents

require_relative '../spec_helper'
require_lib 'reek/smell_detectors/base_detector'
require_lib 'reek/detector_repository'

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

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

    it 'excludes the smell detector base class' do
      expect(smell_types).not_to include(Reek::SmellDetectors::BaseDetector)
    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

17 entries across 17 versions & 1 rubygems

Version Path
reek-5.0.2 spec/reek/detector_repository_spec.rb
reek-5.0.1 spec/reek/detector_repository_spec.rb
reek-5.0.0 spec/reek/detector_repository_spec.rb
reek-4.8.2 spec/reek/detector_repository_spec.rb
reek-4.8.1 spec/reek/detector_repository_spec.rb
reek-4.8.0 spec/reek/detector_repository_spec.rb
reek-4.7.3 spec/reek/detector_repository_spec.rb
reek-4.7.2 spec/reek/detector_repository_spec.rb
reek-4.7.1 spec/reek/detector_repository_spec.rb
reek-4.7.0 spec/reek/detector_repository_spec.rb
reek-4.6.2 spec/reek/detector_repository_spec.rb
reek-4.6.1 spec/reek/detector_repository_spec.rb
reek-4.6.0 spec/reek/detector_repository_spec.rb
reek-4.5.6 spec/reek/detector_repository_spec.rb
reek-4.5.5 spec/reek/detector_repository_spec.rb
reek-4.5.4 spec/reek/detector_repository_spec.rb
reek-4.5.3 spec/reek/detector_repository_spec.rb