Use Enumerable#one? instead of homebrew equivalent
This commit is contained in:
parent
ec9d6f65f6
commit
13b8227c03
2 changed files with 6 additions and 2 deletions
|
@ -110,13 +110,16 @@ module Mutant
|
|||
# @return [true]
|
||||
# returns true when there is only one when branch
|
||||
#
|
||||
# @return [false]
|
||||
# returns false otherwise
|
||||
#
|
||||
# @api private
|
||||
#
|
||||
def one?
|
||||
when_branches.size == 1
|
||||
when_branches.one?
|
||||
end
|
||||
|
||||
# Return duplicatedd when branches
|
||||
# Return duplicate of when branches
|
||||
#
|
||||
# @return [Array]
|
||||
#
|
||||
|
|
|
@ -30,6 +30,7 @@ describe Mutant::Mutator, '.each' do
|
|||
|
||||
it_should_behave_like 'a mutator'
|
||||
end
|
||||
|
||||
pending 'interpolated string literal (DynamicString)' do
|
||||
let(:source) { '"foo#{1}bar"' }
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue