Sha256: 2b38894bc73483d61069bb068f0af3e869d798456a7f86f40b7f93d840647108

Contents?: true

Size: 439 Bytes

Versions: 33

Compression:

Stored size: 439 Bytes

Contents

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

require 'reek/if_context'

include Reek

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

  it 'should find 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

33 entries across 33 versions & 3 rubygems

Version Path
kevinrutherford-reek-1.0.0 spec/reek/if_context_spec.rb
kevinrutherford-reek-1.0.1 spec/reek/if_context_spec.rb
kevinrutherford-reek-1.1.1 spec/reek/if_context_spec.rb
kevinrutherford-reek-1.1.2.1 spec/reek/if_context_spec.rb
kevinrutherford-reek-1.1.2 spec/reek/if_context_spec.rb
kevinrutherford-reek-1.1.3.1 spec/reek/if_context_spec.rb
kevinrutherford-reek-1.1.3.10 spec/reek/if_context_spec.rb
kevinrutherford-reek-1.1.3.11 spec/reek/if_context_spec.rb
kevinrutherford-reek-1.1.3.12 spec/reek/if_context_spec.rb
kevinrutherford-reek-1.1.3.13 spec/reek/if_context_spec.rb
kevinrutherford-reek-1.1.3.14 spec/reek/if_context_spec.rb
kevinrutherford-reek-1.1.3.15 spec/reek/if_context_spec.rb
kevinrutherford-reek-1.1.3.16 spec/reek/if_context_spec.rb
kevinrutherford-reek-1.1.3.2 spec/reek/if_context_spec.rb
kevinrutherford-reek-1.1.3.3 spec/reek/if_context_spec.rb
kevinrutherford-reek-1.1.3.4 spec/reek/if_context_spec.rb
kevinrutherford-reek-1.1.3.5 spec/reek/if_context_spec.rb
kevinrutherford-reek-1.1.3.6 spec/reek/if_context_spec.rb
kevinrutherford-reek-1.1.3.7 spec/reek/if_context_spec.rb
kevinrutherford-reek-1.1.3.8 spec/reek/if_context_spec.rb