Sha256: 7ea505893c09ac5da705afbf68d91134b69eaf65102586d69cbf5c8a08dbc88d

Contents?: true

Size: 569 Bytes

Versions: 5

Compression:

Stored size: 569 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

module Rubocop
  module Report
    describe Report do
      let (:report) { Report.new('test') }

      it 'initially has 0 entries' do
        report.entries.size.should == 0
      end

      it 'initially has nothing to report' do
        report.empty?.should be_true
      end

      it 'keeps track of offences' do
        cop = Cop::Cop.new
        cop.add_offence(:convention, 1, 'message')

        report << cop

        report.empty?.should be_false
        report.entries.size.should == 1
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

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