Sha256: f5e5ffdd0d7e79941b15a51dab285215c71b43ec0f5291e4e2c62dc2e07fae1c

Contents?: true

Size: 595 Bytes

Versions: 4

Compression:

Stored size: 595 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)
        s.string.should == ['test:1: C: message 1',
                            "test:11: F: message 2\n"].join("\n")
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rubocop-0.3.2 spec/rubocop/reports/emacs_style_spec.rb
rubocop-0.3.1 spec/rubocop/reports/emacs_style_spec.rb
rubocop-0.3.0 spec/rubocop/reports/emacs_style_spec.rb
rubocop-0.2.1 spec/rubocop/reports/emacs_style_spec.rb