spec/rubocop/cops/cop_spec.rb in rubocop-0.3.2 vs spec/rubocop/cops/cop_spec.rb in rubocop-0.4.0
- old
+ new
@@ -3,29 +3,29 @@
require 'spec_helper'
module Rubocop
module Cop
describe Cop do
- let (:cop) { Cop.new }
+ let(:cop) { Cop.new }
it 'initially has 0 offences' do
- cop.offences.size.should == 0
+ expect(cop.offences).to be_empty
end
it 'initially has nothing to report' do
- cop.has_report?.should be_false
+ expect(cop.has_report?).to be_false
end
it 'keeps track of offences' do
cop.add_offence(:convention, 1, 'message')
- cop.offences.size.should == 1
+ expect(cop.offences.size).to eq(1)
end
it 'will report registered offences' do
cop.add_offence(:convention, 1, 'message')
- cop.has_report?.should be_true
+ expect(cop.has_report?).to be_true
end
end
end
end