spec/rubocop/cop/style/favor_join_spec.rb in rubocop-0.12.0 vs spec/rubocop/cop/style/favor_join_spec.rb in rubocop-0.13.0
- old
+ new
@@ -4,16 +4,16 @@
module Rubocop
module Cop
module Style
describe FavorJoin do
- let(:fj) { FavorJoin.new }
+ subject(:fj) { FavorJoin.new }
it 'registers an offence for an array followed by string' do
inspect_source(fj,
['%w(one two three) * ", "'])
expect(fj.offences.size).to eq(1)
- expect(fj.offences.map(&:message))
+ expect(fj.messages)
.to eq([FavorJoin::MSG])
end
it 'does not register an offence for numbers' do
inspect_source(fj,