Sha256: 33741796b0789c96d7f4829fdc579929b27b8e4bc4dfb246051108a7ff70f34c
Contents?: true
Size: 749 Bytes
Versions: 3
Compression:
Stored size: 749 Bytes
Contents
# encoding: utf-8 require 'spec_helper' module Rubocop module Cop describe SpaceInsideParens do let (:space) { SpaceInsideParens.new } it 'registers an offence for spaces inside parens' do inspect_source(space, 'file.rb', ['f( 3)', 'g(3 )']) space.offences.map(&:message).should == ['Space inside parentheses detected.', 'Space inside parentheses detected.'] end it 'accepts parentheses in block parameter list' do inspect_source(space, 'file.rb', ['list.inject(Tms.new) { |sum, (label, item)|', '}']) space.offences.map(&:message).should == [] end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rubocop-0.3.2 | spec/rubocop/cops/space_inside_parens_spec.rb |
rubocop-0.3.1 | spec/rubocop/cops/space_inside_parens_spec.rb |
rubocop-0.3.0 | spec/rubocop/cops/space_inside_parens_spec.rb |