spec/spec_helper.rb in bugsnag-6.14.0 vs spec/spec_helper.rb in bugsnag-6.15.0
- old
+ new
@@ -28,9 +28,17 @@
event = get_event_from_payload(payload)
expect(event["exceptions"].size).to eq(1)
event["exceptions"].last
end
+def get_code_from_payload(payload, index = 0)
+ exception = get_exception_from_payload(payload)
+
+ expect(exception["stacktrace"].size).to be > index
+
+ exception["stacktrace"][index]["code"]
+end
+
def notify_test_exception(*args)
Bugsnag.notify(RuntimeError.new("test message"), *args)
end
def ruby_version_greater_equal?(version)