Sha256: 7900d92c501afe87388a9b5dad6e10b746ca34fd4236a5f2ec4dfedc3581905e

Contents?: true

Size: 610 Bytes

Versions: 4

Compression:

Stored size: 610 Bytes

Contents

require File.dirname(__FILE__) + '/../spec_helper.rb'

require 'reek/stop_context'

include Reek
include Reek::Smells

describe StopContext do
  before :each do
    @stop = StopContext.new
  end

  context 'with a module that is not loaded' do
    it 'does not find the module' do
      @stop.find_module('CGI').should == nil
    end
    it 'does not find an unqualified class in the module' do
      @stop.find_module('HtmlExtension').should == nil
    end
  end

  context 'with a module that is loaded' do
    it 'finds the module' do
      @stop.find_module('Reek').name.should == 'Reek'
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
reek-1.2.4 spec/reek/stop_context_spec.rb
reek-1.2.3 spec/reek/stop_context_spec.rb
reek-1.2.2 spec/reek/stop_context_spec.rb
reek-1.2.1 spec/reek/stop_context_spec.rb