Sha256: 40c32c74771198247ef5f5cfe5d7b2bc00734b73a46615fc0bab63c2aba589fd

Contents?: true

Size: 334 Bytes

Versions: 13

Compression:

Stored size: 334 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe RuboCop::Cop::Style::InlineComment do
  it 'registers an offense for a inline comment' do
    code = 'two = 1 + 1 # An inline comment'

    expect(subject).to find_offenses_in(code)
      .with_message('Avoid inline comments.')
      .with_highlight('# An inline comment')
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
rubyjobbuilderdsl-0.0.2 vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/inline_comment_spec.rb
rubyjobbuilderdsl-0.0.1 vendor/bundle/ruby/2.1.0/gems/rubocop-0.26.0/spec/rubocop/cop/style/inline_comment_spec.rb
rubocop-0.29.1 spec/rubocop/cop/style/inline_comment_spec.rb
rubocop-0.29.0 spec/rubocop/cop/style/inline_comment_spec.rb
rubocop-0.28.0 spec/rubocop/cop/style/inline_comment_spec.rb
rubocop-0.27.1 spec/rubocop/cop/style/inline_comment_spec.rb
rubocop-0.27.0 spec/rubocop/cop/style/inline_comment_spec.rb
rubocop-0.26.1 spec/rubocop/cop/style/inline_comment_spec.rb
rubocop-0.26.0 spec/rubocop/cop/style/inline_comment_spec.rb
rubocop-0.25.0 spec/rubocop/cop/style/inline_comment_spec.rb
rubocop-0.24.1 spec/rubocop/cop/style/inline_comment_spec.rb
rubocop-0.24.0 spec/rubocop/cop/style/inline_comment_spec.rb
rubocop-0.23.0 spec/rubocop/cop/style/inline_comment_spec.rb