dawarich/spec/support/github_api_stubs.rb
2025-11-19 20:35:43 +01:00

14 lines
395 B
Ruby

# frozen_string_literal: true
# Stub GitHub API requests in tests
RSpec.configure do |config|
config.before(:each) do
# Stub GitHub API version checking
stub_request(:get, "https://api.github.com/repos/Freika/dawarich/tags")
.to_return(
status: 200,
body: [{ name: "v0.1.0" }].to_json,
headers: { 'Content-Type' => 'application/json' }
)
end
end