Skip to content

Commit

Permalink
Remove unused doubled methods (rubocop#3509)
Browse files Browse the repository at this point in the history
These methods can be safely removed from their test doubles without
breaking the test case.
  • Loading branch information
backus authored and Neodelf committed Oct 15, 2016
1 parent b004fda commit aa27c62
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spec/rubocop/cop/commissioner_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
it 'returns all offenses except the ones of the cop' do
cops = []
cops << double('cop A', offenses: %w(foo), excluded_file?: false)
cops << double('cop B', offenses: %w(bar), excluded_file?: true)
cops << double('cop B', excluded_file?: true)
cops << double('cop C', offenses: %w(baz), excluded_file?: false)
cops.each(&:as_null_object)

Expand Down
2 changes: 1 addition & 1 deletion spec/rubocop/formatter/worst_offenders_formatter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module Formatter

describe '#finished' do
context 'when there are many offenses' do
let(:offense) { double('offense', cop_name: 'SomeCop') }
let(:offense) { double('offense') }

before do
formatter.started(files)
Expand Down

0 comments on commit aa27c62

Please sign in to comment.