Sha256: 7a40215ea8617cee3436839fe44acd6c65401b3582668bbced9bd63438c6bf6d

Contents?: true

Size: 609 Bytes

Versions: 4

Compression:

Stored size: 609 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

module Rubocop
  module Cop
    module Style
      describe EndOfLine do
        let(:eol) { EndOfLine.new }

        it 'registers an offence for CR+LF' do
          inspect_source(eol, ["x=0\r", ''])
          expect(eol.offences.map(&:message)).to eq(
            ['Carriage return character detected.'])
        end

        it 'registers an offence for CR at end of file' do
          inspect_source(eol, ["x=0\r"])
          expect(eol.offences.map(&:message)).to eq(
            ['Carriage return character detected.'])
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
rubocop-0.10.0 spec/rubocop/cops/style/end_of_line_spec.rb
rubocop-0.9.1 spec/rubocop/cops/style/end_of_line_spec.rb
sabat-rubocop-0.9.0 spec/rubocop/cops/style/end_of_line_spec.rb
rubocop-0.9.0 spec/rubocop/cops/style/end_of_line_spec.rb