Sha256: d5d70b9837e7383728b34c0d0d82145663f45835bf7a8eb1cb37cdfdd78e3c9d
Contents?: true
Size: 772 Bytes
Versions: 12
Compression:
Stored size: 772 Bytes
Contents
require 'spec_helper' require 'reek/core/warning_collector' require 'reek/smell_warning' include Reek::Core describe WarningCollector do before(:each) do @collector = WarningCollector.new end context 'when empty' do it 'reports no warnings' do expect(@collector.warnings).to eq([]) end end context 'with one warning' do before :each do @warning = Reek::SmellWarning.new(Reek::Smells::FeatureEnvy.new(''), context: 'fred', lines: [1, 2, 3], message: 'hello') @collector.found_smell(@warning) end it 'reports that warning' do expect(@collector.warnings).to eq([@warning]) end end end
Version data entries
12 entries across 12 versions & 1 rubygems