Skip to content

Commit

Permalink
fix Ruby method redef warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Bodah committed Aug 14, 2019
1 parent 83609d8 commit 88c802f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/spy/strategy/wrap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ def initialize(spy)
end

def apply
ReplaceMethod.call(@spy.original.owner, @spy, mode: :stub)
ReplaceMethod.call(@spy.original.owner, @spy, mode: :stub, remove_existing: true)
end

def undo
ReplaceMethod.call(@spy.original.owner, @spy, mode: :restore)
ReplaceMethod.call(@spy.original.owner, @spy, mode: :restore, remove_existing: true)
end
end
end
Expand Down

0 comments on commit 88c802f

Please sign in to comment.