Sha256: 0937a39e52527aee5b1bd0c30368b53b6797374a074e2f2f86888ee5c6b12bda
Contents?: true
Size: 1009 Bytes
Versions: 2
Compression:
Stored size: 1009 Bytes
Contents
require File.join(File.dirname(File.dirname(File.dirname(File.expand_path(__FILE__)))), 'spec_helper') require File.join(File.dirname(File.dirname(File.dirname(File.dirname(File.expand_path(__FILE__))))), 'lib', 'reek', 'examiner') require File.join(File.dirname(File.dirname(File.dirname(File.dirname(File.expand_path(__FILE__))))), 'lib', 'reek', 'cli', 'report') include Reek include Reek::Cli describe ReportSection, " when empty" do context 'empty source' do it 'has an empty quiet_report' do examiner = Examiner.new('') ReportSection.new(examiner, false).quiet_report.should == '' end end context 'with a couple of smells' do it 'should mention every smell name' do examiner = Examiner.new('def simple(a) a[3] end') rpt = ReportSection.new(examiner, false) @lines = rpt.smell_list.split("\n") @lines.should have_at_least(2).lines @lines[0].should match('[Utility Function]') @lines[1].should match('[Feature Envy]') end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
reek-1.2.7.1 | spec/reek/cli/report_spec.rb |
reek-1.2.7 | spec/reek/cli/report_spec.rb |