forked from troessner/reek
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
00bb11a
commit 0545915
Showing
3 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
require File.dirname(__FILE__) + '/../../spec_helper.rb' | ||
|
||
require 'reek/report' | ||
require 'reek/smells/duplication' | ||
|
||
include Reek | ||
include Reek::Smells | ||
|
||
describe SmellDetector, 'when masked' do | ||
before(:each) do | ||
@detector = Duplication.new | ||
@detector.be_masked | ||
@detector.found(nil, 'help') | ||
end | ||
|
||
it 'reports smells as masked' do | ||
rpt = Report.new | ||
@detector.report_on(rpt) | ||
rpt.length.should == 0 | ||
rpt.num_masked_smells.should == 1 | ||
end | ||
end | ||
|