Skip to content

Instantly share code, notes, and snippets.

@Nikoloutsos
Created May 8, 2022 12:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nikoloutsos/8d360bfd4a2b673b9d2fe1f88f35bd12 to your computer and use it in GitHub Desktop.
Save Nikoloutsos/8d360bfd4a2b673b9d2fe1f88f35bd12 to your computer and use it in GitHub Desktop.
# READ MORE ABOUT configuration here https://merowing.info/Sourcery/usage.html
configurations:
# -- Blueground configuration --
- sources:
- Blueground
- SwiftPackages
- Pods
- SwiftPackages/Sourcery/Sources/Sourcery/helpers/AutoFixturableConfiguration
templates:
- SwiftPackages/Sourcery/Sources/Sourcery/Templates
output:
path: BluegroundTests/Sourcery
link:
project: ./Blueground.xcodeproj
target: BluegroundTests
group: BluegroundTests/Sourcery
args:
testableImport: "Blueground" # [MANDATORY] Your mocks will have "@testable import <testableImport>"
containedPathSubstringToApplyTemplate: "/Blueground/" # [MANDATORY] If a protocol with Automockable annotation exists but it's path doesn't contain <focusFolder> it will be ignored.
# -- SPM Analytics configuration --
- sources:
- SwiftPackages/Analytics # -- In case your SPM depends on other protocols it is REQUIRED to add them here --
- SwiftPackages/Sourcery/Sources/Sourcery/helpers/AutoFixturableConfiguration
templates:
- SwiftPackages/Sourcery/Sources/Sourcery/Templates
output:
SwiftPackages/Analytics/Tests/AnalyticsTests/Mocks
args:
testableImport: "Analytics"
containedPathSubstringToApplyTemplate: "/SwiftPackages/Analytics/"
- sources:
- SwiftPackages/Interfaces
- SwiftPackages/Sourcery/Sources/Sourcery/helpers/AutoFixturableConfiguration
templates:
- SwiftPackages/Sourcery/Sources/Sourcery/Templates
output:
SwiftPackages/Interfaces/Tests/InterfacesTests/Mocks
args:
testableImport: "Interfaces"
containedPathSubstringToApplyTemplate: "/SwiftPackages/Interfaces/"
- sources:
- SwiftPackages/PaymentsProviders
- SwiftPackages/Sourcery/Sources/Sourcery/helpers/AutoFixturableConfiguration
templates:
- SwiftPackages/Sourcery/Sources/Sourcery/Templates
output:
SwiftPackages/PaymentsProviders/Tests/PaymentsProvidersTests/Mocks
args:
testableImport: "PaymentsProviders"
containedPathSubstringToApplyTemplate: "/SwiftPackages/PaymentsProviders/"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment