2025-04-22 09:10:00 -06:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
|
|
RSpec.shared_context "with application dependencies" do
|
2025-05-05 15:54:40 -06:00
|
|
|
let :settings do
|
|
|
|
|
TRMNL::API::Configuration::Content[
|
|
|
|
|
content_type: "application/json",
|
|
|
|
|
uri: "https://trmnl.app/api"
|
|
|
|
|
]
|
|
|
|
|
end
|
2025-04-22 09:10:00 -06:00
|
|
|
|
2025-05-05 15:54:40 -06:00
|
|
|
let(:logger) { Cogger.new id: "trmnl-api", io: StringIO.new, level: :debug }
|
|
|
|
|
let(:http) { class_spy HTTP }
|
|
|
|
|
|
|
|
|
|
before { TRMNL::API::Container.stub! settings:, http:, logger: }
|
2025-04-22 09:10:00 -06:00
|
|
|
|
|
|
|
|
after { TRMNL::API::Container.restore }
|
|
|
|
|
end
|