Skip to content

Commit

Permalink
Invoke swizzleForTesting in beforeSuite.
Browse files Browse the repository at this point in the history
  • Loading branch information
andersio committed Apr 5, 2017
1 parent c2f99e1 commit 4a35eb5
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 10 deletions.
6 changes: 4 additions & 2 deletions ReactiveCocoaTests/InterceptingSpec.swift
Expand Up @@ -8,8 +8,10 @@ import CoreGraphics

class InterceptingSpec: QuickSpec {
override func spec() {
ForwardInvocationTestObject.swizzleForTesting()

beforeSuite {
ForwardInvocationTestObject.swizzleForTesting()
}

describe("trigger(for:)") {
var object: InterceptedObject!
weak var _object: InterceptedObject?
Expand Down
4 changes: 3 additions & 1 deletion ReactiveCocoaTests/UIKit/UIButtonSpec.swift
Expand Up @@ -7,7 +7,9 @@ import enum Result.NoError

class UIButtonSpec: QuickSpec {
override func spec() {
UIControl.swizzleForTesting()
beforeSuite {
UIControl.swizzleForTesting()
}

var button: UIButton!
weak var _button: UIButton?
Expand Down
4 changes: 3 additions & 1 deletion ReactiveCocoaTests/UIKit/UIControlSpec.swift
Expand Up @@ -7,7 +7,9 @@ import enum Result.NoError

class UIControlSpec: QuickSpec {
override func spec() {
UIControl.swizzleForTesting()
beforeSuite {
UIControl.swizzleForTesting()
}

var control: UIControl!
weak var _control: UIControl?
Expand Down
4 changes: 3 additions & 1 deletion ReactiveCocoaTests/UIKit/UIDatePickerSpec.swift
Expand Up @@ -6,7 +6,9 @@ import Nimble

class UIDatePickerSpec: QuickSpec {
override func spec() {
UIControl.swizzleForTesting()
beforeSuite {
UIControl.swizzleForTesting()
}

var date: Date!
var picker: UIDatePicker!
Expand Down
4 changes: 3 additions & 1 deletion ReactiveCocoaTests/UIKit/UIRefreshControlSpec.swift
Expand Up @@ -6,7 +6,9 @@ import Result

class UIRefreshControlSpec: QuickSpec {
override func spec() {
UIControl.swizzleForTesting()
beforeSuite {
UIControl.swizzleForTesting()
}

var refreshControl: UIRefreshControl!
weak var _refreshControl: UIRefreshControl!
Expand Down
4 changes: 3 additions & 1 deletion ReactiveCocoaTests/UIKit/UISegmentedControlSpec.swift
Expand Up @@ -6,7 +6,9 @@ import Result

class UISegmentedControlSpec: QuickSpec {
override func spec() {
UIControl.swizzleForTesting()
beforeSuite {
UIControl.swizzleForTesting()
}

it("should accept changes from bindings to its selected segment index") {
let s = UISegmentedControl(items: ["0", "1", "2"])
Expand Down
2 changes: 2 additions & 0 deletions ReactiveCocoaTests/UIKit/UISliderSpec.swift
Expand Up @@ -7,7 +7,9 @@ import UIKit

class UISliderSpec: QuickSpec {
override func spec() {
beforeSuite {
UIControl.swizzleForTesting()
}

var slider: UISlider!
weak var _slider: UISlider?
Expand Down
4 changes: 3 additions & 1 deletion ReactiveCocoaTests/UIKit/UIStepperSpec.swift
Expand Up @@ -7,7 +7,9 @@ import UIKit

class UIStepperSpec: QuickSpec {
override func spec() {
UIControl.swizzleForTesting()
beforeSuite {
UIControl.swizzleForTesting()
}

var stepper: UIStepper!
weak var _stepper: UIStepper?
Expand Down
4 changes: 3 additions & 1 deletion ReactiveCocoaTests/UIKit/UISwitchSpec.swift
Expand Up @@ -6,7 +6,9 @@ import Result

class UISwitchSpec: QuickSpec {
override func spec() {
UIControl.swizzleForTesting()
beforeSuite {
UIControl.swizzleForTesting()
}

var toggle: UISwitch!
weak var _toggle: UISwitch?
Expand Down
4 changes: 3 additions & 1 deletion ReactiveCocoaTests/UIKit/UITextFieldSpec.swift
Expand Up @@ -7,7 +7,9 @@ import enum Result.NoError

class UITextFieldSpec: QuickSpec {
override func spec() {
UIControl.swizzleForTesting()
beforeSuite {
UIControl.swizzleForTesting()
}

var textField: UITextField!
weak var _textField: UITextField?
Expand Down

0 comments on commit 4a35eb5

Please sign in to comment.