Sha256: 8c3e5eac3fa547e23315b5972cb7ba29dfc1aef57ef4acb804219e2e1c61629e

Contents?: true

Size: 651 Bytes

Versions: 3

Compression:

Stored size: 651 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe 'RuboCop Project' do
  describe 'default configuration file' do
    it 'has configuration for all cops' do
      cop_names = Rubocop::Cop::Cop.all.map(&:cop_name)
      expect(Rubocop::Config.load_file('config/default.yml').keys.sort)
        .to eq((['AllCops'] + cop_names).sort)
    end
  end

  describe 'source codes' do
    before { $stdout = StringIO.new }
    after  { $stdout = STDOUT }

    it 'has no violations' do
      # Need to pass an empty array explicitly
      # so that the CLI does not refer arguments of `rspec`
      expect(Rubocop::CLI.new.run([])).to eq(0)
    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
rubocop-0.9.1 spec/project_spec.rb
sabat-rubocop-0.9.0 spec/project_spec.rb
rubocop-0.9.0 spec/project_spec.rb