Sha256: 05a8c33c55d1d29767f9c78a6fd3db0340d184486174ddcf04e463638ff7e305

Contents?: true

Size: 523 Bytes

Versions: 7

Compression:

Stored size: 523 Bytes

Contents

# frozen_string_literal: true
require 'analysers_test_helper'
require 'rubycritic/analysers/complexity'

describe RubyCritic::Analyser::Complexity do
  context 'when analysing a file' do
    before do
      @analysed_module = AnalysedModuleDouble.new(path: 'test/samples/flog/complex.rb', smells: [])
      analysed_modules = [@analysed_module]
      RubyCritic::Analyser::Complexity.new(analysed_modules).run
    end

    it 'calculates its complexity' do
      @analysed_module.complexity.must_be :>, 0
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rubycritic-3.2.0 test/lib/rubycritic/analysers/complexity_test.rb
rubycritic-3.1.3 test/lib/rubycritic/analysers/complexity_test.rb
rubycritic-3.1.2 test/lib/rubycritic/analysers/complexity_test.rb
rubycritic-3.1.1 test/lib/rubycritic/analysers/complexity_test.rb
rubycritic-3.1.0 test/lib/rubycritic/analysers/complexity_test.rb
rubycritic-3.0.0 test/lib/rubycritic/analysers/complexity_test.rb
rubycritic-2.9.4 test/lib/rubycritic/analysers/complexity_test.rb