AliSoftware / OHHTTPStubs

Stub your network requests easily! Test your apps with fake network data and custom response time, response code and headers!
MIT License
5.03k stars 602 forks source link

Export OHHTTPStubs from OHHTTPStubsSwift #353

Closed manicmaniac closed 7 months ago

manicmaniac commented 1 year ago

Checklist

Description

Export OHHTTPStubs from OHHTTPStubsSwift using @_exported so that users doesn't need to import both of them.

Motivation and Context

Previously SwiftPM users should import both OHHTTPStubs and OHHTTPStubsSwift, contrary to CocoaPods users who need to import only OHHTTPStubs. This difference is small but an obstacle for migrating to Swift Package Manager.

  1. Firstly I removed import OHHTTPStubs statement from Tests/OHHTTPStubsSwiftTests/SwiftHelperTests.swift. This change made tests fail.
  2. Then add @_exported modifier to import statement, then the test passed.