Sha256: 55191cfe91fa52d7c68b36d6b3ee2bafa1e9809d190bc3f25f57e5c4d776c5ed
Contents?: true
Size: 760 Bytes
Versions: 3
Compression:
Stored size: 760 Bytes
Contents
require_relative '../../spec_helper' require_relative '../../../lib/reek/context/module_context' require_relative '../../../lib/reek/context/root_context' RSpec.describe Reek::Context::ModuleContext do it 'should report module name for smell in method' do expect(' module Fred def simple(x) x + 1; end end ').to reek_of(:UncommunicativeParameterName, name: 'x') end it 'should not report module with empty class' do expect('# module for test module Fred # module for test class Jim; end; end').not_to reek end end RSpec.describe Reek::Context::ModuleContext do it 'should recognise global constant' do expect('# module for test module ::Global # module for test class Inside; end; end').not_to reek end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
reek-3.4.0 | spec/reek/context/module_context_spec.rb |
reek-3.3.1 | spec/reek/context/module_context_spec.rb |
reek-3.3.0 | spec/reek/context/module_context_spec.rb |