diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b7ad9fa..0cbb2fa 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,6 +2,7 @@ - [Open Package](#open-package) - [Lint Package](#lint-package) +- [Testing](#testing) - [Creating Releases](#creating-releases) ## Open Package @@ -28,6 +29,14 @@ To run analysis rules: make analyze ``` +## Testing + +To re-record all existing snapshot references, delete all using the following command and then run the tests. + +``` +make delete-snapshots +``` + ## Creating Releases Releases are made [on the GitHub website](https://github.com/Tinder/CollectionBuilders/releases/new). diff --git a/Makefile b/Makefile index ab85709..ad8d665 100644 --- a/Makefile +++ b/Makefile @@ -39,6 +39,14 @@ analyze: swift package plugin \ swiftlint analyze --strict --progress --reporter "$(format)" --compiler-log-path "$$XCODEBUILD_LOG" +.PHONY: delete-snapshots +delete-snapshots: + @for snapshots in $$(find Tests -type d -name "__Snapshots__"); \ + do \ + rm -rf "$$snapshots"; \ + echo "Deleted $$snapshots"; \ + done + .PHONY: docs docs: target ?= CollectionBuilders docs: destination ?= generic/platform=iOS diff --git a/Package.swift b/Package.swift index 4563315..62debf3 100644 --- a/Package.swift +++ b/Package.swift @@ -36,7 +36,7 @@ let package = Package( "CollectionBuilders", "Nimble", ]), - ], + ] ) package.targets.forEach { target in