Skip to content

Commit

Permalink
Add allCasesDictionary for MMMLoadableState
Browse files Browse the repository at this point in the history
This pairs with certain unit tests using varyParameters to go through all loadable states.
  • Loading branch information
aleh committed Oct 31, 2022
1 parent b6e0c9e commit f184db3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion MMMTestCase.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Pod::Spec.new do |s|

s.name = "MMMTestCase"
s.version = "1.7.0"
s.version = "1.8.0"
s.summary = "Our helpers for FBTestCase and XCTestCase"
s.description = s.summary
s.homepage = "https://github.com/mediamonks/#{s.name}"
Expand Down
17 changes: 17 additions & 0 deletions Sources/MMMTestCase/MMMLoadableState.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// Starbucks App.
// Copyright (c) 2022 MediaMonks. All rights reserved.
//

import MMMLoadable

extension MMMLoadableState {
/// A dictionary with all states suitable for `MMMTestCase.varyParameters(_:block:)`
/// (keys are kebab-case already).
public private(set) static var allCasesDictionary: [String: MMMLoadableState] = [
"idle": .idle,
"syncing": .syncing,
"did-fail-to-sync": .didFailToSync,
"did-sync-successfully": .didSyncSuccessfully
]
}

0 comments on commit f184db3

Please sign in to comment.