diff options
Diffstat (limited to 'spec/rubocop/cop_todo_spec.rb')
-rw-r--r-- | spec/rubocop/cop_todo_spec.rb | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/spec/rubocop/cop_todo_spec.rb b/spec/rubocop/cop_todo_spec.rb index c641001789f..49206d76d5a 100644 --- a/spec/rubocop/cop_todo_spec.rb +++ b/spec/rubocop/cop_todo_spec.rb @@ -3,7 +3,7 @@ require 'rubocop_spec_helper' require_relative '../../rubocop/cop_todo' -RSpec.describe RuboCop::CopTodo do +RSpec.describe RuboCop::CopTodo, feature_category: :tooling do let(:cop_name) { 'Cop/Rule' } subject(:cop_todo) { described_class.new(cop_name) } @@ -32,6 +32,19 @@ RSpec.describe RuboCop::CopTodo do end end + describe '#add_files' do + it 'adds files' do + cop_todo.add_files(%w[a.rb b.rb]) + cop_todo.add_files(%w[a.rb]) + cop_todo.add_files(%w[]) + + expect(cop_todo).to have_attributes( + files: contain_exactly('a.rb', 'b.rb'), + offense_count: 0 + ) + end + end + describe '#autocorrectable?' do subject { cop_todo.autocorrectable? } |