diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index bb6e643a3..4d465513e 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -11,22 +11,19 @@ on: - master env: - # Keep using Xcode 13 until CP releases the fix for watchOS verification on Xcode 14 - # https://github.com/CocoaPods/CocoaPods/issues/11558 - # https://github.com/CocoaPods/CocoaPods/pull/11660 - DEVELOPER_DIR: /Applications/Xcode_13.4.1.app/Contents/Developer + DEVELOPER_DIR: /Applications/Xcode_16.0.app/Contents/Developer name: Verification | Release jobs: carthage: if: ${{ github.event_name == 'push' || ( github.event_name == 'pull_request' && github.event.label.name == 'ci:verify' ) }} name: Carthage Verification - runs-on: macos-12 + runs-on: macos-15 steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Recover cached dependencies - uses: actions/cache@v1 + uses: actions/cache@v4 id: dependency-cache with: path: ~/Library/Caches/org.carthage.CarthageKit @@ -39,10 +36,10 @@ jobs: swiftpm-macos: if: ${{ github.event_name == 'push' || ( github.event_name == 'pull_request' && github.event.label.name == 'ci:verify' ) }} name: SwiftPM macOS Verification - runs-on: macos-12 + runs-on: macos-15 steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Pull dependencies run: | swift package resolve @@ -54,10 +51,10 @@ jobs: cocoapods: if: ${{ github.event_name == 'push' || ( github.event_name == 'pull_request' && github.event.label.name == 'ci:verify' ) }} name: CocoaPods Verification - runs-on: macos-12 + runs-on: macos-15 steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: CocoaPods verification run: | pod repo update @@ -66,22 +63,22 @@ jobs: release-github: if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }} name: GitHub Release - runs-on: macos-12 + runs-on: macos-15 needs: [swiftpm-macos, cocoapods, carthage] steps: - name: git checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: create release - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 release-cocoapods: if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }} name: CocoaPods Release - runs-on: macos-12 + runs-on: macos-15 needs: [swiftpm-macos, cocoapods, carthage] steps: - name: git checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: pod trunk push env: COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e14a8ab8e..17eebcf5f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,18 +3,18 @@ name: Test jobs: test: name: Test - runs-on: macos-12 + runs-on: macos-15 strategy: fail-fast: false matrix: destination: [macOS, iOS, tvOS, watchOS] env: - DEVELOPER_DIR: /Applications/Xcode_14.1.app/Contents/Developer + DEVELOPER_DIR: /Applications/Xcode_16.0.app/Contents/Developer steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Recover cached dependencies - uses: actions/cache@v1 + uses: actions/cache@v4 id: dependency-cache with: path: Carthage/Checkouts @@ -31,7 +31,7 @@ jobs: case "${{ matrix.destination }}" in "iOS") - DESTINATION="platform=iOS Simulator,name=iPhone 11 Pro" + DESTINATION="platform=iOS Simulator,name=iPhone 16" SCHEME=ReactiveSwift-iOS ;; "tvOS") @@ -40,7 +40,7 @@ jobs: ;; "watchOS") ACTION=build - DESTINATION="platform=watchOS Simulator,name=Apple Watch Series 5 (44mm)" + DESTINATION="platform=watchOS Simulator,name=Apple Watch Series 10 (46mm)" SCHEME=ReactiveSwift-watchOS ;; "macCatalyst") @@ -68,17 +68,17 @@ jobs: swiftpm-linux: strategy: matrix: - swift: ["5.7"] + swift: ["5.9"] name: SwiftPM Linux runs-on: ubuntu-22.04 steps: - name: Setup Swift version - uses: swift-actions/setup-swift@v1 + uses: swift-actions/setup-swift@v2 with: swift-version: ${{ matrix.swift }} - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Pull dependencies run: | swift package resolve diff --git a/CHANGELOG.md b/CHANGELOG.md index b6fbd3cb2..bc45d871d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,12 @@ # master *Please add new entries at the top.* -1. Change `QueueScheduler` to use unspecified QoS when QoS parameter is defaulted -1. Add support for VisionOS (#875, kudos to @NachoSoto) -1. Fix minimum deployment target of iOS 11 in CocoaPods +1. Change `QueueScheduler` to use unspecified QoS when QoS parameter is defaulted (#880, kudos to @jamieQ) +1. Add support for visionOS (#875, kudos to @NachoSoto) 1. Fix CI release git tag push trigger (#869, kudos to @p4checo) -1. Find and remove items from Bag using a binary search to improve performance when the collection gets large. -2. Add extension to `ScopedDisposable` for inner `SerialDisposable` (#873, kudos to @sirnacnud) +1. Find and remove items from Bag using a binary search to improve performance when the collection gets large (#878, kudos to @nickoto) +1. Add extension to `ScopedDisposable` for inner `SerialDisposable` (#873, kudos to @sirnacnud) +1. Updated project settings for Xcode 16, bumped min deployment targets to iOS 12, macOS 10.13, tvOS 12, watchOS 4, visionOS 1.0 (#883, kudos to @mluisbrown) # 7.1.1 1. Bumped deployment target to iOS 11, tvOS 11, watchOS 4, macOS 10.13, per Xcode 14 warnings (#865, kudos to @lickel) diff --git a/Cartfile.private b/Cartfile.private index 760240fd4..ef0f247fd 100644 --- a/Cartfile.private +++ b/Cartfile.private @@ -1,3 +1,3 @@ github "xcconfigs/xcconfigs" ~> 1.1 -github "Quick/Quick" ~> 4.0.0 -github "Quick/Nimble" ~> 9.0.0 +github "Quick/Quick" ~> 7.0.0 +github "Quick/Nimble" ~> 13.0.0 diff --git a/Cartfile.resolved b/Cartfile.resolved index bbd8eb5be..f8f62dc73 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,3 +1,3 @@ -github "Quick/Nimble" "v9.2.1" -github "Quick/Quick" "v4.0.0" +github "Quick/Nimble" "v13.2.1" +github "Quick/Quick" "v7.4.1" github "xcconfigs/xcconfigs" "1.1" diff --git a/Carthage/Checkouts/Nimble b/Carthage/Checkouts/Nimble index c93f16c25..efe11bbca 160000 --- a/Carthage/Checkouts/Nimble +++ b/Carthage/Checkouts/Nimble @@ -1 +1 @@ -Subproject commit c93f16c25af5770f0d3e6af27c9634640946b068 +Subproject commit efe11bbca024b57115260709b5c05e01131470d0 diff --git a/Carthage/Checkouts/Quick b/Carthage/Checkouts/Quick index bd86ca014..6d01974d2 160000 --- a/Carthage/Checkouts/Quick +++ b/Carthage/Checkouts/Quick @@ -1 +1 @@ -Subproject commit bd86ca0141e3cfb333546de5a11ede63f0c4a0e6 +Subproject commit 6d01974d236f598633cac58280372c0c8cfea5bc diff --git a/Package.resolved b/Package.resolved index f99c90046..653bc4e47 100644 --- a/Package.resolved +++ b/Package.resolved @@ -6,8 +6,8 @@ "repositoryURL": "https://github.com/mattgallagher/CwlCatchException.git", "state": { "branch": null, - "revision": "682841464136f8c66e04afe5dbd01ab51a3a56f2", - "version": "2.1.0" + "revision": "3ef6999c73b6938cc0da422f2c912d0158abb0a0", + "version": "2.2.0" } }, { @@ -15,8 +15,8 @@ "repositoryURL": "https://github.com/mattgallagher/CwlPreconditionTesting.git", "state": { "branch": null, - "revision": "02b7a39a99c4da27abe03cab2053a9034379639f", - "version": "2.0.0" + "revision": "2ef56b2caf25f55fa7eef8784c30d5a767550f54", + "version": "2.2.1" } }, { @@ -24,8 +24,8 @@ "repositoryURL": "https://github.com/Quick/Nimble.git", "state": { "branch": null, - "revision": "af1730dde4e6c0d45bf01b99f8a41713ce536790", - "version": "9.2.0" + "revision": "efe11bbca024b57115260709b5c05e01131470d0", + "version": "13.2.1" } }, { @@ -33,8 +33,8 @@ "repositoryURL": "https://github.com/Quick/Quick.git", "state": { "branch": null, - "revision": "bd86ca0141e3cfb333546de5a11ede63f0c4a0e6", - "version": "4.0.0" + "revision": "6d01974d236f598633cac58280372c0c8cfea5bc", + "version": "7.4.1" } } ] diff --git a/Package.swift b/Package.swift index 1d695a46d..8aa431c33 100644 --- a/Package.swift +++ b/Package.swift @@ -10,8 +10,8 @@ let package = Package( .library(name: "ReactiveSwift", targets: ["ReactiveSwift"]), ], dependencies: [ - .package(url: "https://github.com/Quick/Quick.git", from: "4.0.0"), - .package(url: "https://github.com/Quick/Nimble.git", from: "9.0.0"), + .package(url: "https://github.com/Quick/Quick.git", from: "7.0.0"), + .package(url: "https://github.com/Quick/Nimble.git", from: "13.0.0"), ], targets: [ .target(name: "ReactiveSwift", dependencies: [], path: "Sources"), diff --git a/ReactiveSwift.podspec b/ReactiveSwift.podspec index 7eaa108a6..04241175f 100644 --- a/ReactiveSwift.podspec +++ b/ReactiveSwift.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "ReactiveSwift" # Version goes here and will be used to access the git tag later on, once we have a first release. - s.version = "7.1.1" + s.version = "7.2.0" s.summary = "Streams of values over time" s.description = <<-DESC ReactiveSwift is a Swift framework inspired by Functional Reactive Programming. It provides APIs for composing and transforming streams of values over time. @@ -10,10 +10,10 @@ Pod::Spec.new do |s| s.license = { :type => "MIT", :file => "LICENSE.md" } s.author = "ReactiveCocoa" - s.ios.deployment_target = "11.0" + s.ios.deployment_target = "12.0" s.osx.deployment_target = "10.13" s.watchos.deployment_target = "4.0" - s.tvos.deployment_target = "11.0" + s.tvos.deployment_target = "12.0" s.source = { :git => "https://github.com/ReactiveCocoa/ReactiveSwift.git", :tag => "#{s.version}" } # Directory glob for all Swift files @@ -25,5 +25,5 @@ Pod::Spec.new do |s| } s.cocoapods_version = ">= 1.7.0" - s.swift_versions = ["5.2", "5.3" "5.4", "5.5", "5.6", "5.7"] + s.swift_versions = ["5.2", "5.3" "5.4", "5.5", "5.6", "5.7", "5.8", "5.9"] end diff --git a/ReactiveSwift.xcodeproj/project.pbxproj b/ReactiveSwift.xcodeproj/project.pbxproj index 9f91d30ab..3eb17fa87 100644 --- a/ReactiveSwift.xcodeproj/project.pbxproj +++ b/ReactiveSwift.xcodeproj/project.pbxproj @@ -1705,16 +1705,16 @@ CODE_SIGNING_REQUIRED = NO; CURRENT_PROJECT_VERSION = 1; ENABLE_TESTABILITY = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - MACOSX_DEPLOYMENT_TARGET = 10.12; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MACOSX_DEPLOYMENT_TARGET = 10.13; PRODUCT_BUNDLE_IDENTIFIER = "org.reactivecocoa.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(PROJECT_NAME)"; SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; SWIFT_VERSION = 5.2; - TVOS_DEPLOYMENT_TARGET = 10.0; + TVOS_DEPLOYMENT_TARGET = 12.0; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 3.0; + WATCHOS_DEPLOYMENT_TARGET = 4.0; XROS_DEPLOYMENT_TARGET = 1.0; }; name = Debug; @@ -1726,16 +1726,16 @@ BITCODE_GENERATION_MODE = bitcode; CODE_SIGNING_REQUIRED = NO; CURRENT_PROJECT_VERSION = 1; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - MACOSX_DEPLOYMENT_TARGET = 10.12; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MACOSX_DEPLOYMENT_TARGET = 10.13; PRODUCT_BUNDLE_IDENTIFIER = "org.reactivecocoa.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(PROJECT_NAME)"; SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; SWIFT_VERSION = 5.2; - TVOS_DEPLOYMENT_TARGET = 10.0; + TVOS_DEPLOYMENT_TARGET = 12.0; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 3.0; + WATCHOS_DEPLOYMENT_TARGET = 4.0; XROS_DEPLOYMENT_TARGET = 1.0; }; name = Release; @@ -1769,7 +1769,6 @@ baseConfigurationReference = E6124BA9267DF505005A3490 /* macOS-XCTest.xcconfig */; buildSettings = { INFOPLIST_FILE = Tests/ReactiveSwiftTests/Info.plist; - MACOSX_DEPLOYMENT_TARGET = 10.12; PRODUCT_NAME = "$(PROJECT_NAME)Tests"; }; name = Debug; @@ -1779,7 +1778,6 @@ baseConfigurationReference = E6124BA9267DF505005A3490 /* macOS-XCTest.xcconfig */; buildSettings = { INFOPLIST_FILE = Tests/ReactiveSwiftTests/Info.plist; - MACOSX_DEPLOYMENT_TARGET = 10.12; PRODUCT_NAME = "$(PROJECT_NAME)Tests"; }; name = Release; @@ -1829,16 +1827,16 @@ BITCODE_GENERATION_MODE = bitcode; CODE_SIGNING_REQUIRED = NO; CURRENT_PROJECT_VERSION = 1; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - MACOSX_DEPLOYMENT_TARGET = 10.12; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MACOSX_DEPLOYMENT_TARGET = 10.13; PRODUCT_BUNDLE_IDENTIFIER = "org.reactivecocoa.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(PROJECT_NAME)"; SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; SWIFT_VERSION = 5.2; - TVOS_DEPLOYMENT_TARGET = 10.0; + TVOS_DEPLOYMENT_TARGET = 12.0; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 3.0; + WATCHOS_DEPLOYMENT_TARGET = 4.0; XROS_DEPLOYMENT_TARGET = 1.0; }; name = Profile; @@ -1860,7 +1858,6 @@ baseConfigurationReference = E6124BA9267DF505005A3490 /* macOS-XCTest.xcconfig */; buildSettings = { INFOPLIST_FILE = Tests/ReactiveSwiftTests/Info.plist; - MACOSX_DEPLOYMENT_TARGET = 10.10; PRODUCT_NAME = "$(PROJECT_NAME)Tests"; }; name = Profile; @@ -1891,16 +1888,16 @@ BITCODE_GENERATION_MODE = bitcode; CODE_SIGNING_REQUIRED = NO; CURRENT_PROJECT_VERSION = 1; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - MACOSX_DEPLOYMENT_TARGET = 10.12; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MACOSX_DEPLOYMENT_TARGET = 10.13; PRODUCT_BUNDLE_IDENTIFIER = "org.reactivecocoa.$(PRODUCT_NAME:rfc1034identifier)-Tests"; PRODUCT_NAME = "$(PROJECT_NAME)"; SWIFT_TREAT_WARNINGS_AS_ERRORS = NO; SWIFT_VERSION = 5.2; - TVOS_DEPLOYMENT_TARGET = 10.0; + TVOS_DEPLOYMENT_TARGET = 12.0; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 3.0; + WATCHOS_DEPLOYMENT_TARGET = 4.0; XROS_DEPLOYMENT_TARGET = 1.0; }; name = Test; @@ -1922,7 +1919,6 @@ baseConfigurationReference = E6124BA9267DF505005A3490 /* macOS-XCTest.xcconfig */; buildSettings = { INFOPLIST_FILE = Tests/ReactiveSwiftTests/Info.plist; - MACOSX_DEPLOYMENT_TARGET = 10.10; PRODUCT_NAME = "$(PROJECT_NAME)Tests"; }; name = Test; diff --git a/ReactiveSwift.xcodeproj/xcshareddata/xcschemes/ReactiveSwift-iOS.xcscheme b/ReactiveSwift.xcodeproj/xcshareddata/xcschemes/ReactiveSwift-iOS.xcscheme index 867a3c291..135cf3431 100644 --- a/ReactiveSwift.xcodeproj/xcshareddata/xcschemes/ReactiveSwift-iOS.xcscheme +++ b/ReactiveSwift.xcodeproj/xcshareddata/xcschemes/ReactiveSwift-iOS.xcscheme @@ -28,9 +28,9 @@ buildForAnalyzing = "NO"> @@ -42,9 +42,9 @@ buildForAnalyzing = "NO"> @@ -68,8 +68,8 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - codeCoverageEnabled = "YES" - shouldUseLaunchSchemeArgsEnv = "YES"> + shouldUseLaunchSchemeArgsEnv = "YES" + codeCoverageEnabled = "YES"> - - - - + + + + diff --git a/ReactiveSwift.xcodeproj/xcshareddata/xcschemes/ReactiveSwift-macOS.xcscheme b/ReactiveSwift.xcodeproj/xcshareddata/xcschemes/ReactiveSwift-macOS.xcscheme index 0c3e486a0..db6e1f685 100644 --- a/ReactiveSwift.xcodeproj/xcshareddata/xcschemes/ReactiveSwift-macOS.xcscheme +++ b/ReactiveSwift.xcodeproj/xcshareddata/xcschemes/ReactiveSwift-macOS.xcscheme @@ -30,7 +30,7 @@ BuildableIdentifier = "primary" BlueprintIdentifier = "1F925EAC195C0D6300ED456B" BuildableName = "Nimble.framework" - BlueprintName = "Nimble-macOS" + BlueprintName = "Nimble" ReferencedContainer = "container:Carthage/Checkouts/Nimble/Nimble.xcodeproj"> @@ -44,7 +44,7 @@ BuildableIdentifier = "primary" BlueprintIdentifier = "DAEB6B8D1943873100289F44" BuildableName = "Quick.framework" - BlueprintName = "Quick-macOS" + BlueprintName = "Quick" ReferencedContainer = "container:Carthage/Checkouts/Quick/Quick.xcodeproj"> diff --git a/ReactiveSwift.xcodeproj/xcshareddata/xcschemes/ReactiveSwift-tvOS.xcscheme b/ReactiveSwift.xcodeproj/xcshareddata/xcschemes/ReactiveSwift-tvOS.xcscheme index b90c8d3de..c4c4f2fc6 100644 --- a/ReactiveSwift.xcodeproj/xcshareddata/xcschemes/ReactiveSwift-tvOS.xcscheme +++ b/ReactiveSwift.xcodeproj/xcshareddata/xcschemes/ReactiveSwift-tvOS.xcscheme @@ -28,9 +28,9 @@ buildForAnalyzing = "NO"> @@ -42,9 +42,9 @@ buildForAnalyzing = "NO"> @@ -68,8 +68,8 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - codeCoverageEnabled = "YES" - shouldUseLaunchSchemeArgsEnv = "YES"> + shouldUseLaunchSchemeArgsEnv = "YES" + codeCoverageEnabled = "YES"> - - - - + + + + diff --git a/Tests/ReactiveSwiftTests/ActionSpec.swift b/Tests/ReactiveSwiftTests/ActionSpec.swift index e183a2073..e00c0d517 100755 --- a/Tests/ReactiveSwiftTests/ActionSpec.swift +++ b/Tests/ReactiveSwiftTests/ActionSpec.swift @@ -13,7 +13,7 @@ import Quick @testable import ReactiveSwift class ActionSpec: QuickSpec { - override func spec() { + override class func spec() { describe("Action") { var action: Action! var enabled: MutableProperty! diff --git a/Tests/ReactiveSwiftTests/AtomicSpec.swift b/Tests/ReactiveSwiftTests/AtomicSpec.swift index 8234f5b9f..0f07b7a71 100644 --- a/Tests/ReactiveSwiftTests/AtomicSpec.swift +++ b/Tests/ReactiveSwiftTests/AtomicSpec.swift @@ -11,7 +11,7 @@ import Quick import ReactiveSwift class AtomicSpec: QuickSpec { - override func spec() { + override class func spec() { var atomic: Atomic! beforeEach { diff --git a/Tests/ReactiveSwiftTests/BagSpec.swift b/Tests/ReactiveSwiftTests/BagSpec.swift index 665f8acb0..364a0f29c 100644 --- a/Tests/ReactiveSwiftTests/BagSpec.swift +++ b/Tests/ReactiveSwiftTests/BagSpec.swift @@ -11,7 +11,7 @@ import Quick import ReactiveSwift class BagSpec: QuickSpec { - override func spec() { + override class func spec() { var bag = Bag() beforeEach { diff --git a/Tests/ReactiveSwiftTests/DateSchedulerAsyncTestCase.swift b/Tests/ReactiveSwiftTests/DateSchedulerAsyncTestCase.swift index 7c02cf271..bd5843001 100644 --- a/Tests/ReactiveSwiftTests/DateSchedulerAsyncTestCase.swift +++ b/Tests/ReactiveSwiftTests/DateSchedulerAsyncTestCase.swift @@ -86,7 +86,11 @@ final class DateSchedulerAsyncTestCase: XCTestCase { task.cancel() // cancel the timer - await waitForExpectations(timeout: 0.1) + #if swift(>=5.8) + await fulfillment(of: [expectation], timeout: 0.1) + #else + await waitForExpectations(timeout: 0.1) + #endif } } #endif diff --git a/Tests/ReactiveSwiftTests/DeprecationSpec.swift b/Tests/ReactiveSwiftTests/DeprecationSpec.swift index 370ac3467..1a5418582 100644 --- a/Tests/ReactiveSwiftTests/DeprecationSpec.swift +++ b/Tests/ReactiveSwiftTests/DeprecationSpec.swift @@ -3,5 +3,5 @@ import Nimble import ReactiveSwift class DeprecationSpec: QuickSpec { - override func spec() {} + override class func spec() {} } diff --git a/Tests/ReactiveSwiftTests/DisposableSpec.swift b/Tests/ReactiveSwiftTests/DisposableSpec.swift index 8a62b2322..1d4c5820e 100644 --- a/Tests/ReactiveSwiftTests/DisposableSpec.swift +++ b/Tests/ReactiveSwiftTests/DisposableSpec.swift @@ -11,7 +11,7 @@ import Quick import ReactiveSwift class DisposableSpec: QuickSpec { - override func spec() { + override class func spec() { describe("SimpleDisposable") { it("should set disposed to true") { let disposable = AnyDisposable() diff --git a/Tests/ReactiveSwiftTests/FlattenSpec.swift b/Tests/ReactiveSwiftTests/FlattenSpec.swift index 873603077..722bd4fee 100644 --- a/Tests/ReactiveSwiftTests/FlattenSpec.swift +++ b/Tests/ReactiveSwiftTests/FlattenSpec.swift @@ -18,7 +18,7 @@ private extension Signal { private typealias Pipe = Signal, TestError>.Pipe class FlattenSpec: QuickSpec { - override func spec() { + override class func spec() { func describeSignalFlattenDisposal(_ flattenStrategy: FlattenStrategy, name: String) { describe(name) { var pipe: Pipe! diff --git a/Tests/ReactiveSwiftTests/FoundationExtensionsSpec.swift b/Tests/ReactiveSwiftTests/FoundationExtensionsSpec.swift index 032bfe28c..3c12506c9 100644 --- a/Tests/ReactiveSwiftTests/FoundationExtensionsSpec.swift +++ b/Tests/ReactiveSwiftTests/FoundationExtensionsSpec.swift @@ -18,7 +18,7 @@ extension Notification.Name { } class FoundationExtensionsSpec: QuickSpec { - override func spec() { + override class func spec() { describe("NotificationCenter.reactive.notifications") { let center = NotificationCenter.default diff --git a/Tests/ReactiveSwiftTests/LifetimeSpec.swift b/Tests/ReactiveSwiftTests/LifetimeSpec.swift index 3b2f40152..892983cff 100644 --- a/Tests/ReactiveSwiftTests/LifetimeSpec.swift +++ b/Tests/ReactiveSwiftTests/LifetimeSpec.swift @@ -3,7 +3,7 @@ import Nimble import ReactiveSwift final class LifetimeSpec: QuickSpec { - override func spec() { + override class func spec() { describe("Lifetime") { it("should complete its lifetime ended signal when the token deinitializes") { let object = MutableReference(TestObject()) diff --git a/Tests/ReactiveSwiftTests/PropertySpec.swift b/Tests/ReactiveSwiftTests/PropertySpec.swift index 8436fec8c..ed3419667 100644 --- a/Tests/ReactiveSwiftTests/PropertySpec.swift +++ b/Tests/ReactiveSwiftTests/PropertySpec.swift @@ -21,7 +21,7 @@ private let subsequentOtherPropertyValue = "SubsequentOtherValue" private let finalOtherPropertyValue = "FinalOtherValue" class PropertySpec: QuickSpec { - override func spec() { + override class func spec() { describe("MutableProperty") { it("should have the value given at initialization") { let mutableProperty = MutableProperty(initialPropertyValue) diff --git a/Tests/ReactiveSwiftTests/ReactiveExtensionsSpec.swift b/Tests/ReactiveSwiftTests/ReactiveExtensionsSpec.swift index 39d6b4e5d..11cc9bf9c 100644 --- a/Tests/ReactiveSwiftTests/ReactiveExtensionsSpec.swift +++ b/Tests/ReactiveSwiftTests/ReactiveExtensionsSpec.swift @@ -18,7 +18,7 @@ extension Reactive where Base: TestExtensionProvider { } final class ReactiveExtensionsSpec: QuickSpec { - override func spec() { + override class func spec() { describe("ReactiveExtensions") { it("allows reactive extensions of instances") { expect(TestExtensionProvider().reactive.instanceProperty.first()?.value) == "instance" diff --git a/Tests/ReactiveSwiftTests/SchedulerSpec.swift b/Tests/ReactiveSwiftTests/SchedulerSpec.swift index 8f1dbd925..3e728ad45 100644 --- a/Tests/ReactiveSwiftTests/SchedulerSpec.swift +++ b/Tests/ReactiveSwiftTests/SchedulerSpec.swift @@ -6,9 +6,6 @@ // Copyright (c) 2014 GitHub. All rights reserved. // -#if canImport(Darwin) -import Darwin.sys.qos -#endif import Dispatch import Foundation @@ -29,7 +26,7 @@ import ReactiveSwift #endif class SchedulerSpec: QuickSpec { - override func spec() { + override class func spec() { describe("ImmediateScheduler") { it("should run enqueued actions immediately") { var didRun = false diff --git a/Tests/ReactiveSwiftTests/SignalLifetimeSpec.swift b/Tests/ReactiveSwiftTests/SignalLifetimeSpec.swift index 14a53203d..bf8478317 100644 --- a/Tests/ReactiveSwiftTests/SignalLifetimeSpec.swift +++ b/Tests/ReactiveSwiftTests/SignalLifetimeSpec.swift @@ -13,7 +13,7 @@ import Quick import ReactiveSwift class SignalLifetimeSpec: QuickSpec { - override func spec() { + override class func spec() { describe("init") { var testScheduler: TestScheduler! diff --git a/Tests/ReactiveSwiftTests/SignalProducerLiftingSpec.swift b/Tests/ReactiveSwiftTests/SignalProducerLiftingSpec.swift index 1e1fe0327..4a9325128 100644 --- a/Tests/ReactiveSwiftTests/SignalProducerLiftingSpec.swift +++ b/Tests/ReactiveSwiftTests/SignalProducerLiftingSpec.swift @@ -14,7 +14,7 @@ import Quick @testable import ReactiveSwift class SignalProducerLiftingSpec: QuickSpec { - override func spec() { + override class func spec() { describe("map") { it("should transform the values of the signal") { let (producer, observer) = SignalProducer.pipe() diff --git a/Tests/ReactiveSwiftTests/SignalProducerNimbleMatchers.swift b/Tests/ReactiveSwiftTests/SignalProducerNimbleMatchers.swift index 4d4b70aac..1fffa7859 100644 --- a/Tests/ReactiveSwiftTests/SignalProducerNimbleMatchers.swift +++ b/Tests/ReactiveSwiftTests/SignalProducerNimbleMatchers.swift @@ -11,17 +11,17 @@ import Foundation import ReactiveSwift import Nimble -public func sendValue(_ value: T?, sendError: E?, complete: Bool) -> Predicate> { +public func sendValue(_ value: T?, sendError: E?, complete: Bool) -> Matcher> { return sendValues(value.map { [$0] } ?? [], sendError: sendError, complete: complete) } -public func sendValues(_ values: [T], sendError maybeSendError: E?, complete: Bool) -> Predicate> { - return Predicate> { actualExpression in +public func sendValues(_ values: [T], sendError maybeSendError: E?, complete: Bool) -> Matcher> { + return Matcher> { actualExpression in precondition(maybeSendError == nil || !complete, "Signals can't both send an error and complete") guard let signalProducer = try actualExpression.evaluate() else { let message = ExpectationMessage.fail("The SignalProducer was not created.") .appendedBeNilHint() - return PredicateResult(status: .fail, message: message) + return MatcherResult(status: .fail, message: message) } var sentValues: [T] = [] @@ -46,7 +46,7 @@ public func sendValues(_ values: [T], sendError mayb "send values <\(values)>", actual: "<\(sentValues)>" ) - return PredicateResult(status: .doesNotMatch, message: message) + return MatcherResult(status: .doesNotMatch, message: message) } if sentError != maybeSendError { @@ -54,13 +54,13 @@ public func sendValues(_ values: [T], sendError mayb "send error <\(String(describing: maybeSendError))>", actual: "<\(String(describing: sentError))>" ) - return PredicateResult(status: .doesNotMatch, message: message) + return MatcherResult(status: .doesNotMatch, message: message) } let completeMessage = complete ? "complete, but the producer did not complete" : "not to complete, but the producer completed" let message = ExpectationMessage.expectedTo(completeMessage) - return PredicateResult(bool: signalCompleted == complete, message: message) + return MatcherResult(bool: signalCompleted == complete, message: message) } } diff --git a/Tests/ReactiveSwiftTests/SignalProducerSpec.swift b/Tests/ReactiveSwiftTests/SignalProducerSpec.swift index a8d926b76..29ff7c1d0 100644 --- a/Tests/ReactiveSwiftTests/SignalProducerSpec.swift +++ b/Tests/ReactiveSwiftTests/SignalProducerSpec.swift @@ -14,7 +14,7 @@ import Quick @testable import ReactiveSwift class SignalProducerSpec: QuickSpec { - override func spec() { + override class func spec() { describe("init") { it("should run the handler once per start()") { var handlerCalledTimes = 0 @@ -3832,9 +3832,9 @@ class SignalProducerSpec: QuickSpec { // MARK: - Helpers -private func == (left: Expectation, right: Any.Type) { - left.to(Predicate { expression in - PredicateResult( +private func == (left: SyncExpectation, right: Any.Type) { + left.to(Matcher { expression in + MatcherResult( bool: try expression.evaluate()! == right, message: ExpectationMessage.expectedActualValueTo("equal to") ) diff --git a/Tests/ReactiveSwiftTests/SignalSpec.swift b/Tests/ReactiveSwiftTests/SignalSpec.swift index 49bfdce0b..c4c416c66 100755 --- a/Tests/ReactiveSwiftTests/SignalSpec.swift +++ b/Tests/ReactiveSwiftTests/SignalSpec.swift @@ -14,7 +14,7 @@ import Quick @testable import ReactiveSwift class SignalSpec: QuickSpec { - override func spec() { + override class func spec() { describe("init") { var testScheduler: TestScheduler! diff --git a/Tests/ReactiveSwiftTests/UnidirectionalBindingSpec.swift b/Tests/ReactiveSwiftTests/UnidirectionalBindingSpec.swift index ffe80d788..8a868d5d5 100644 --- a/Tests/ReactiveSwiftTests/UnidirectionalBindingSpec.swift +++ b/Tests/ReactiveSwiftTests/UnidirectionalBindingSpec.swift @@ -9,7 +9,7 @@ private class Object { } class UnidirectionalBindingSpec: QuickSpec { - override func spec() { + override class func spec() { describe("BindingTarget") { var token: Lifetime.Token! var lifetime: Lifetime! diff --git a/Tests/ReactiveSwiftTests/ValidatingPropertySpec.swift b/Tests/ReactiveSwiftTests/ValidatingPropertySpec.swift index 86e190930..89bf966bb 100644 --- a/Tests/ReactiveSwiftTests/ValidatingPropertySpec.swift +++ b/Tests/ReactiveSwiftTests/ValidatingPropertySpec.swift @@ -3,7 +3,7 @@ import Nimble import ReactiveSwift class ValidatingPropertySpec: QuickSpec { - override func spec() { + override class func spec() { describe("ValidatingProperty") { describe("no dependency") { var root: MutableProperty!