Created
April 18, 2020 17:43
-
-
Save kaspernj/341b9feebfe0f7dec0eeccc344dd0da8 to your computer and use it in GitHub Desktop.
Stubbing original method with sleep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
expect(object).to receive(:method_name).and_wrap_original do |original, *args, &blk| | |
sleep 1 | |
original.call(*args, &blk) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment