Calling AppSignal from test

Hi, need some help figuring out how I can test try-rescue part of the code using AppSignal in Elixir. My AppSignal has configuration for staging and prod but no other environment.

defp test_main_list(post_2) do
    main_list = [post_1, post_3]

    case post_2 in main_list do
      true ->

      false ->
        try do
          raise "Exception"
          exception ->
            Appsignal.set_error(exception, __STACKTRACE__)

            final_main_list = [post_1, post_3] ++ [post_2]

Seems like you can disable AppSignal in tests so the code should run just fine. If you want to test that an error has been reported, you either need to wrap and mock the Appsignal.set_error call with something like Mox or try to use some of the existing functions - maybe passing the error through the Appsignal.Logger and then capturing it with ExUnit.CaptureLog could work.