Skip to content

Commit 8aedccc

Browse files
Merge pull request #86 from ably/10-document-testing-approach
[ECO-5385] Document the approach for using ably-cocoa internals in tests
2 parents 5c6ff74 + 6404b52 commit 8aedccc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ Example:
123123
// @specNotApplicable CHA-EX3a - Our API does not have a concept of "partial options" unlike the JS API which this spec item considers.
124124
```
125125

126+
#### Using ably-cocoa internals in tests
127+
128+
Some of our integration tests require access to ably-cocoa internals that are not exposed via `_AblyPluginSupportPrivate`, for example to inject protocol messages. Since, unlike the plugin implementation, the test suite does not require access to a stable private API (as it will never be compiled by end users and we're in control of which version of ably-cocoa gets used for testing the plugin), we just directly import ably-cocoa's internal APIs in the test suite using `import Ably.Private`.
129+
126130
## Developing ably-cocoa alongside this plugin
127131

128132
The quickest way to edit ably-cocoa is to use `swift package edit ably-cocoa --path ably-cocoa`, which will give you a Git checkout of ably-cocoa at `ably-cocoa`. To edit ably-cocoa using Xcode, you will then need to open `ably-cocoa/Package.swift` _separately_ (making sure to close any other LiveObjects Xcode windows, else Xcode will not let you edit it).

0 commit comments

Comments
 (0)