spec/project_spec.rb in rubocop-0.8.3 vs spec/project_spec.rb in rubocop-0.9.0
- old
+ new
@@ -1,27 +1,24 @@
# encoding: utf-8
require 'spec_helper'
describe 'RuboCop Project' do
- describe '.rubocop.yml' 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('.rubocop.yml').keys.sort)
+ expect(Rubocop::Config.load_file('config/default.yml').keys.sort)
.to eq((['AllCops'] + cop_names).sort)
end
end
- describe 'source codes', broken: true do
+ 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`
- Rubocop::CLI.new.run([])
- expect($stdout.string).to match(
- /files inspected, no offences detected\n/
- )
+ expect(Rubocop::CLI.new.run([])).to eq(0)
end
end
end