Sha256: 8f2007eceb8ae897140c0731a5cfe33ebdfcf0d0a36cf9c3f974dbe7d8c98e46
Contents?: true
Size: 618 Bytes
Versions: 12
Compression:
Stored size: 618 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Rubocop::Cop::VariableInspector do include AST::Sexp class ExampleInspector include Rubocop::Cop::VariableInspector end subject(:inspector) { ExampleInspector.new } describe '#process_node' do before do inspector.variable_table.push_scope(s(:def)) end context 'when processing lvar node' do let(:node) { s(:lvar, :foo) } context 'when the variable is not yet declared' do it 'does not raise error' do expect { inspector.process_node(node) }.not_to raise_error end end end end end
Version data entries
12 entries across 12 versions & 2 rubygems