Created
November 28, 2023 18:00
-
-
Save narath/4d23ed6d7a3f757901dece4cf6ec8dd3 to your computer and use it in GitHub Desktop.
Simple Mock for Honeybadger.notify in Rails test
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
test "something" do | |
notified = false | |
Honeybadger.stub :notify, Proc.new { |s| notified = true } do | |
something_that_causes_honeybadger_notify_to_be_used | |
end | |
assert notified, "Honeybadger was not notified" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment