Use Enumerable#one? instead of homebrew equivalent

This commit is contained in:
Markus Schirp 2012-08-01 18:00:42 +02:00
parent ec9d6f65f6
commit 13b8227c03
2 changed files with 6 additions and 2 deletions

View file

@ -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]
#

View file

@ -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"' }