diff --git a/sentry-ruby/spec/sentry/test_helper_spec.rb b/sentry-ruby/spec/sentry/test_helper_spec.rb index dad59f6b1..200356661 100644 --- a/sentry-ruby/spec/sentry/test_helper_spec.rb +++ b/sentry-ruby/spec/sentry/test_helper_spec.rb @@ -16,11 +16,11 @@ expect(Sentry.get_current_client.transport).to be_a(Sentry::HTTPTransport) end - after do - teardown_sentry_test - end - describe "#setup_sentry_test" do + after do + teardown_sentry_test + end + it "raises error when the SDK is not initialized" do allow(Sentry).to receive(:initialized?).and_return(false) @@ -51,6 +51,10 @@ setup_sentry_test end + after do + teardown_sentry_test + end + it "returns the last sent event" do Sentry.capture_message("foobar") Sentry.capture_message("barbaz") @@ -66,6 +70,10 @@ setup_sentry_test end + after do + teardown_sentry_test + end + it "extracts exceptions from an ErrorEvent" do event = Sentry.get_current_client.event_from_exception(Exception.new("foobar"))