require'spec_helper'require'rubocop'require'rubocop/rspec/support'require_relative'../../../rubocop/cop/in_batches'describeRuboCop::Cop::InBatchesdoincludeCopHelpersubject(:cop){described_class.new}it'registers an offense when in_batches is used'doinspect_source(cop,'foo.in_batches do; end')aggregate_failuresdoexpect(cop.offenses.size).toeq(1)expect(cop.offenses.map(&:line)).toeq([1])endendend