Example of an automated script that does most of this: https://github.com/surpher/PactSwiftMockServer/blob/fb8148866bb05f49a0b1dcaae66c67bad1e7eca7/Support/build_rust_dependencies
curl https://sh.rustup.rs -sSf | sh
// With info gathered at https://stackoverflow.com/a/42235227/789720 | |
import UIKit | |
// MARK: - Use | |
// set label to be of class MJLabel programmatically or in storyboards | |
// set the label to be of preferred dynamic type Title 1|Title 2|...|body|... | |
// MARK: - "Global" settings | |
struct MJBranding { | |
static let fontFamily: String = "Party LET" |
#!/bin/bash -eu | |
################################################################################## | |
## Use pact-broker CLI tool instead of this script! | |
## https://github.com/pact-foundation/pact-ruby-standalone/releases | |
################################################################################## | |
## If for some reason can't use the pact-broker tool, the following could work... | |
## env vars: | |
## $pactBrokerAccount | |
## $pactBrokerUsername | |
## $pactBrokerPassword |
class ViewControllerTests: XCTestCase { | |
func testDismissGetsCalled() { | |
let sut = MockViewController() | |
sut.loadViewIfNeeded() | |
guard let dismissButton = sut.navigationItem.leftBarButtonItem else { XCTFail("should have a dismiss button"); return } | |
guard let action = dismissButton.action else { XCTFail("dismiss button should have an action"); return } | |
sut.performSelector(onMainThread: action, with: dismissButton, waitUntilDone: true) | |
Example of an automated script that does most of this: https://github.com/surpher/PactSwiftMockServer/blob/fb8148866bb05f49a0b1dcaae66c67bad1e7eca7/Support/build_rust_dependencies
curl https://sh.rustup.rs -sSf | sh
#!/usr/bin/env bash | |
# Found at: | |
# - https://github.com/Carthage/Carthage/issues/3019#issuecomment-665136323 | |
# - https://github.com/Carthage/Carthage/issues/3019#issuecomment-665136323 | |
# carthage-build.sh | |
# Usage example: ./carthage-build.sh --platform iOS | |
set -euo pipefail |
func testExample_AnimalsWithChildrenMultiple() { | |
let one = mockService | |
.uponReceiving("a request for animals with children") | |
.given("animals have children") | |
.withRequest(method: .GET, path: "/animals1") | |
.willRespondWith( | |
status: 200, | |
body: [ | |
"animals": Matcher.EachLike( | |
[ |