Sha256: 671d1d535d42047ed89ff841dd51d2863d4a7146e6db4378507d43913ce9b791

Contents?: true

Size: 602 Bytes

Versions: 17

Compression:

Stored size: 602 Bytes

Contents

# encoding: utf-8

require 'spec_helper'
require 'stringio'

module Rubocop
  module Report
    describe EmacsStyle do
      let(:emacs_style) { Rubocop::Report.create('test', :emacs_style) }

      it 'displays parsable text' do
        cop = Cop::Cop.new
        cop.add_offence(:convention, 1, 'message 1')
        cop.add_offence(:fatal,     11, 'message 2')

        emacs_style << cop

        s = StringIO.new
        emacs_style.display(s)
        expect(s.string).to eq ['test:1: C: message 1',
                                "test:11: F: message 2\n"].join("\n")
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
rubocop-0.8.3 spec/rubocop/reports/emacs_style_spec.rb
rubocop-0.8.2 spec/rubocop/reports/emacs_style_spec.rb
rubocop-0.8.1 spec/rubocop/reports/emacs_style_spec.rb
rubocop-0.8.0 spec/rubocop/reports/emacs_style_spec.rb
rubocop-0.7.2 spec/rubocop/reports/emacs_style_spec.rb
rubocop-0.7.1 spec/rubocop/reports/emacs_style_spec.rb
rubocop-0.7.0 spec/rubocop/reports/emacs_style_spec.rb
rubocop-0.6.1 spec/rubocop/reports/emacs_style_spec.rb
rubocop-0.6.0 spec/rubocop/reports/emacs_style_spec.rb
rubocop-0.5.0 spec/rubocop/reports/emacs_style_spec.rb
rubocop-0.4.6 spec/rubocop/reports/emacs_style_spec.rb
rubocop-0.4.5 spec/rubocop/reports/emacs_style_spec.rb
rubocop-0.4.4 spec/rubocop/reports/emacs_style_spec.rb
rubocop-0.4.3 spec/rubocop/reports/emacs_style_spec.rb
rubocop-0.4.2 spec/rubocop/reports/emacs_style_spec.rb
rubocop-0.4.1 spec/rubocop/reports/emacs_style_spec.rb
rubocop-0.4.0 spec/rubocop/reports/emacs_style_spec.rb