Sha256: 6aa9465f5bc90a2d74d7f4321698085cab13418431b703ff5db44481689a0629

Contents?: true

Size: 427 Bytes

Versions: 1

Compression:

Stored size: 427 Bytes

Contents

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

require 'reek/if_context'

include Reek

describe IfContext do
  it 'finds a class within top-level code' do
    'unless jim; class Array; end; end'.should_not reek
  end

  it 'finds class within top-level code' do
    stopctx = StopContext.new
    ifctx = IfContext.new(stopctx, [:if, [:vcall, :jim]])
    ifctx.find_module(Name.new(:Array)).should_not be_nil
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
reek-1.2.6 spec/reek/if_context_spec.rb