module MuxHelper
  def stub_mux_live_stream(response_attrs = {})
    response = double({
      id: "id", 
      key: "key", 
      playback_id: "playback_id", 
      simulcast_id: "simulcast_id",
      simulcast_destination: double("playback_embed": "playback_embed>")
    }.merge(response_attrs))

    allow(MuxLiveStream).to receive(:create_with_simulcast).and_return(response)
  end
end

RSpec.configure do |config|
  config.include MuxHelper
end
