Sha256: 5daf71bb9e8ac67a432d942bb12647294cdea0a34197f081018ce9a48295018b
Contents?: true
Size: 921 Bytes
Versions: 2
Compression:
Stored size: 921 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', 'core', 'smell_configuration') include Reek::Core shared_examples_for 'SmellDetector' do context 'exception matching follows the context' do before :each do @ctx = mock('context') end it 'when false' do @ctx.should_receive(:matches?).and_return(false) @detector.exception?(@ctx).should == false end it 'when true' do @ctx.should_receive(:matches?).and_return(true) @detector.exception?(@ctx).should == true end end context 'configuration' do it 'becomes disabled when disabled' do @detector.configure({@detector.smell_type => {SmellConfiguration::ENABLED_KEY => false}}) @detector.should_not be_enabled end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
reek-1.2.7.1 | spec/reek/smells/smell_detector_shared.rb |
reek-1.2.7 | spec/reek/smells/smell_detector_shared.rb |