Sha256: 370f1f1e3216a73249f3c604fb9a889f5180ddcefbaf5eaa9c2bde11843e9cbf
Contents?: true
Size: 761 Bytes
Versions: 6
Compression:
Stored size: 761 Bytes
Contents
require 'analysers_test_helper' require 'rubycritic/analysers/smells/flog' describe Rubycritic::Analyser::FlogSmells do context 'when analysing a complex file' do before do @analysed_module = AnalysedModuleDouble.new(path: 'test/samples/flog/smelly.rb', smells: []) analysed_modules = [@analysed_module] Rubycritic::Analyser::FlogSmells.new(analysed_modules).run end it 'detects its smells' do @analysed_module.smells.length.must_equal 1 end it 'creates smells with messages' do smell = @analysed_module.smells.first smell.message.must_be_instance_of String end it 'creates smells with scores' do smell = @analysed_module.smells.first smell.score.must_be :>, 0 end end end
Version data entries
6 entries across 6 versions & 1 rubygems