-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
54ab16b
commit df0f639
Showing
11 changed files
with
99 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
4.0 | ||
5.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
github "Quick/Quick" | ||
github "Quick/Nimble" | ||
github "tarunon/XCTAssertNoLeak" "master" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
github "Quick/Nimble" "v7.0.2" | ||
github "Quick/Quick" "v1.2.0" | ||
github "Quick/Nimble" "v8.0.1" | ||
github "Quick/Quick" "v2.0.0" | ||
github "tarunon/XCTAssertNoLeak" "40b247b16d658c7e41774a4756f16f331e403976" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
Pod::Spec.new do |s| | ||
s.name = "FluxxKit" | ||
s.version = "1.1.0" | ||
s.version = "1.2.0" | ||
s.summary = "Unidirectional data flow for Reactive programming." | ||
s.homepage = "https://github.com/keitaoouchi/FluxxKit" | ||
s.license = { :type => "MIT", :file => "LICENSE" } | ||
s.author = { "keitaoouchi" => "[email protected]" } | ||
s.source = { :git => "https://github.com/keitaoouchi/FluxxKit.git", :tag => "#{s.version}" } | ||
s.source_files = "FluxxKit/*.{swift,h}" | ||
s.frameworks = "Foundation" | ||
s.ios.deployment_target = "8.0" | ||
s.ios.deployment_target = "9.0" | ||
s.pod_target_xcconfig = { | ||
"SWIFT_VERSION": "5.0" | ||
} | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
FluxxKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>IDEDidComputeMac32BitWarning</key> | ||
<true/> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
FluxxKit.xcodeproj/xcshareddata/xcschemes/FluxxKitTests.xcscheme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import XCTest | ||
import XCTAssertNoLeak | ||
@testable import FluxxKit | ||
|
||
class LeatTests: XCTestCase { | ||
|
||
func testNoLeaks() { | ||
let middleware = Middleware() | ||
let store = Store<DummyState, Action>(reducer: DummyReducer()) | ||
Dispatcher.shared.register(middleware: middleware) | ||
Dispatcher.shared.register(store: store) | ||
Dispatcher.shared.unregister(middleware: Middleware.self) | ||
Dispatcher.shared.unregister(store: store) | ||
|
||
XCTAssertNoLeak(store) | ||
XCTAssertNoLeak(middleware) | ||
} | ||
} | ||
|
||
// MARK: - Test target | ||
private extension LeatTests { | ||
|
||
enum Action: ActionType { | ||
case dummy | ||
} | ||
|
||
class Middleware: MiddlewareType { | ||
|
||
var beforeCallCount = 0 | ||
var afterCallCount = 0 | ||
|
||
func before(dispatch action: ActionType, to store: StoreType) { | ||
self.beforeCallCount += 1 | ||
} | ||
|
||
func after(dispatch action: ActionType, to store: StoreType) { | ||
self.afterCallCount += 1 | ||
} | ||
} | ||
|
||
final class DummyState: StateType { | ||
var totalCallCount = 0 | ||
} | ||
|
||
class DummyReducer: Reducer<DummyState, Action> { | ||
override func reduce(state: LeatTests.DummyState, action: LeatTests.Action) { | ||
switch action { | ||
case .dummy: | ||
state.totalCallCount += 1 | ||
} | ||
} | ||
} | ||
|
||
} |