Sha256: 0096a889fb0a7e36ebcd69145108485fac1ac1774f6ca1bcac30660eff0c7551

Contents?: true

Size: 667 Bytes

Versions: 3

Compression:

Stored size: 667 Bytes

Contents

require_relative '../../../spec_helper'
require_lib 'reek/report/code_climate/code_climate_configuration'

RSpec.describe Reek::Report::CodeClimateConfiguration do
  yml = described_class.load
  smell_types = Reek::SmellDetectors::BaseDetector.descendants.map(&:smell_type)

  smell_types.each do |name|
    config = yml.fetch(name)
    it "provides remediation_points for #{name}" do
      expect(config['remediation_points']).to be_a Integer
    end

    it "provides content for #{name}" do
      expect(config['content']).to be_a String
    end
  end

  it 'does not include extraneous configuration' do
    expect(smell_types).to match_array(yml.keys)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
reek-6.0.3 spec/reek/report/code_climate/code_climate_configuration_spec.rb
reek-6.0.2 spec/reek/report/code_climate/code_climate_configuration_spec.rb
reek-6.0.1 spec/reek/report/code_climate/code_climate_configuration_spec.rb