Skip to content

Commit

Permalink
Change …ExactEffects to …ExactlyEffects
Browse files Browse the repository at this point in the history
  • Loading branch information
kmcbride committed Aug 23, 2021
1 parent 8c486ae commit 3de4bae
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion MobiusNimble/Source/NimbleFirstMatchers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public func haveOnlyEffects<Model, Effect: Equatable>(_ effects: [Effect]) -> Ni
///
/// - Parameter effects: the effects to match (possibly empty)
/// - Returns: a `Predicate` that matches `First` instances that include all the supplied effects
public func haveExactEffects<Model, Effect: Equatable>(_ effects: [Effect]) -> Nimble.Predicate<First<Model, Effect>> {
public func haveExactlyEffects<Model, Effect: Equatable>(_ effects: [Effect]) -> Nimble.Predicate<First<Model, Effect>> {
return Nimble.Predicate<First<Model, Effect>>.define(matcher: { actualExpression -> Nimble.PredicateResult in
guard let first = try actualExpression.evaluate() else {
return unexpectedNilParameterPredicateResult
Expand Down
2 changes: 1 addition & 1 deletion MobiusNimble/Source/NimbleNextMatchers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public func haveOnlyEffects<Model, Effect: Equatable>(_ expected: [Effect]) -> N
///
/// - Parameter expected: the effects to match (possibly empty)
/// - Returns: a `Predicate` that matches `Next` instances that include all the supplied effects
public func haveExactEffects<Model, Effect: Equatable>(_ expected: [Effect]) -> Nimble.Predicate<Next<Model, Effect>> {
public func haveExactlyEffects<Model, Effect: Equatable>(_ expected: [Effect]) -> Nimble.Predicate<Next<Model, Effect>> {
return Nimble.Predicate<Next<Model, Effect>>.define(matcher: { actualExpression in
guard let next = try actualExpression.evaluate() else {
return unexpectedNilParameterPredicate
Expand Down
10 changes: 5 additions & 5 deletions MobiusNimble/Test/NimbleFirstMatchersTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ class NimbleFirstMatchersTests: QuickSpec {

beforeEach {
let first = First<Int, Int>(model: 3, effects: expectedEffects)
expect(first).to(haveExactEffects(expectedEffects))
expect(first).to(haveExactlyEffects(expectedEffects))
}

it("should match") {
Expand All @@ -311,7 +311,7 @@ class NimbleFirstMatchersTests: QuickSpec {

beforeEach {
let first = First<Int, Int>(model: 3, effects: actualEffects)
expect(first).to(haveExactEffects(expectedEffects))
expect(first).to(haveExactlyEffects(expectedEffects))
}

it("should produce an appropriate error message") {
Expand All @@ -325,7 +325,7 @@ class NimbleFirstMatchersTests: QuickSpec {

beforeEach {
let first = First<Int, Int>(model: 3, effects: actualEffects)
expect(first).to(haveExactEffects(expectedEffects))
expect(first).to(haveExactlyEffects(expectedEffects))
}

it("should produce an appropriate error message") {
Expand All @@ -339,7 +339,7 @@ class NimbleFirstMatchersTests: QuickSpec {

beforeEach {
let first = First<Int, Int>(model: 3, effects: actualEffects)
expect(first).to(haveExactEffects(expectedEffects))
expect(first).to(haveExactlyEffects(expectedEffects))
}

it("should produce an appropriate error message") {
Expand All @@ -350,7 +350,7 @@ class NimbleFirstMatchersTests: QuickSpec {
context("when matching nil") {
beforeEach {
let first: First<Int, Int>? = nil
expect(first).to(haveExactEffects([1]))
expect(first).to(haveExactlyEffects([1]))
}

it("should not match") {
Expand Down
14 changes: 7 additions & 7 deletions MobiusNimble/Test/NimbleNextMatchersTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ class NimbleNextMatchersTests: QuickSpec {
context("when the effects are the same") {
beforeEach {
let next = Next<String, Int>.dispatchEffects(expected)
expect(next).to(haveExactEffects(expected))
expect(next).to(haveExactlyEffects(expected))
}

it("should match") {
Expand All @@ -534,7 +534,7 @@ class NimbleNextMatchersTests: QuickSpec {

beforeEach {
let next = Next<String, Int>.dispatchEffects(actual)
expect(next).to(haveExactEffects(expected))
expect(next).to(haveExactlyEffects(expected))
}

it("should produce an appropriate error message") {
Expand All @@ -547,7 +547,7 @@ class NimbleNextMatchersTests: QuickSpec {

beforeEach {
let next = Next<String, Int>.dispatchEffects(actual)
expect(next).to(haveExactEffects(expected))
expect(next).to(haveExactlyEffects(expected))
}

it("should produce an appropriate error message") {
Expand All @@ -560,7 +560,7 @@ class NimbleNextMatchersTests: QuickSpec {

beforeEach {
let next = Next<String, Int>.dispatchEffects(actual)
expect(next).to(haveExactEffects(expected))
expect(next).to(haveExactlyEffects(expected))
}

it("should produce an appropriate error message") {
Expand All @@ -572,7 +572,7 @@ class NimbleNextMatchersTests: QuickSpec {
context("when not expecting effects") {
beforeEach {
let next = Next<String, Int>.noChange
expect(next).to(haveExactEffects([]))
expect(next).to(haveExactlyEffects([]))
}

it("should match") {
Expand All @@ -583,7 +583,7 @@ class NimbleNextMatchersTests: QuickSpec {
context("when expecting effects") {
beforeEach {
let next = Next<String, Int>.noChange
expect(next).to(haveExactEffects(expected))
expect(next).to(haveExactlyEffects(expected))
}

it("should produce an appropriate error message") {
Expand All @@ -595,7 +595,7 @@ class NimbleNextMatchersTests: QuickSpec {
context("when matching nil") {
beforeEach {
let next: Next<String, Int>? = nil
expect(next).to(haveExactEffects(expected))
expect(next).to(haveExactlyEffects(expected))
}

it("should produce an appropriate error message") {
Expand Down
2 changes: 1 addition & 1 deletion MobiusTest/Source/FirstMatchers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public func hasOnlyEffects<Model, Effect: Equatable>(
///
/// - Parameter expected: the effects to match (possibly empty)
/// - Returns: a `Predicate` that matches `First` instances that include all the supplied effects
public func hasExactEffects<Model, Effect: Equatable>(
public func hasExactlyEffects<Model, Effect: Equatable>(
_ expected: [Effect],
file: StaticString = #file,
line: UInt = #line
Expand Down
2 changes: 1 addition & 1 deletion MobiusTest/Source/NextMatchers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public func hasOnlyEffects<Model, Effect: Equatable>(
///
/// - Parameter expected: the effects to match (possibly empty)
/// - Returns: a `Predicate` that matches `Next` instances that include all the supplied effects
public func hasExactEffects<Model, Effect: Equatable>(
public func hasExactlyEffects<Model, Effect: Equatable>(
_ expected: [Effect],
file: StaticString = #file,
line: UInt = #line
Expand Down
8 changes: 4 additions & 4 deletions MobiusTest/Test/FirstMatchersTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ class FirstMatchersTests: QuickSpec {

beforeEach {
let first = First<Int, Int>(model: 3, effects: expectedEffects)
let sut: FirstPredicate<Int, Int> = hasExactEffects(expectedEffects)
let sut: FirstPredicate<Int, Int> = hasExactlyEffects(expectedEffects)
result = sut(first)
}

Expand All @@ -246,7 +246,7 @@ class FirstMatchersTests: QuickSpec {

beforeEach {
let first = First<Int, Int>(model: 3, effects: actualEffects)
let sut: FirstPredicate<Int, Int> = hasExactEffects(expectedEffects)
let sut: FirstPredicate<Int, Int> = hasExactlyEffects(expectedEffects)
result = sut(first)
}

Expand All @@ -261,7 +261,7 @@ class FirstMatchersTests: QuickSpec {

beforeEach {
let first = First<Int, Int>(model: 3, effects: actualEffects)
let sut: FirstPredicate<Int, Int> = hasExactEffects(expectedEffects)
let sut: FirstPredicate<Int, Int> = hasExactlyEffects(expectedEffects)
result = sut(first)
}

Expand All @@ -276,7 +276,7 @@ class FirstMatchersTests: QuickSpec {

beforeEach {
let first = First<Int, Int>(model: 3, effects: actualEffects)
let sut: FirstPredicate<Int, Int> = hasExactEffects(expectedEffects)
let sut: FirstPredicate<Int, Int> = hasExactlyEffects(expectedEffects)
result = sut(first)
}

Expand Down
8 changes: 4 additions & 4 deletions MobiusTest/Test/NextMatchersTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ class XCTestNextMatchersTests: QuickSpec {
var sut: NextPredicate<String, Int>!

beforeEach {
sut = hasExactEffects(expected)
sut = hasExactlyEffects(expected)
}

context("when the effects are the same") {
Expand Down Expand Up @@ -493,7 +493,7 @@ class XCTestNextMatchersTests: QuickSpec {

beforeEach {
let next = Next<String, Int>.dispatchEffects(actual)
sut = hasExactEffects(expected)
sut = hasExactlyEffects(expected)
result = sut(next)
}

Expand All @@ -506,7 +506,7 @@ class XCTestNextMatchersTests: QuickSpec {
context("when not expecting effects") {
beforeEach {
let next = Next<String, String>.noChange
let sut: NextPredicate<String, String> = hasExactEffects([])
let sut: NextPredicate<String, String> = hasExactlyEffects([])
result = sut(next)
}

Expand All @@ -520,7 +520,7 @@ class XCTestNextMatchersTests: QuickSpec {

beforeEach {
let next = Next<String, Int>.noChange
sut = hasExactEffects(expected)
sut = hasExactlyEffects(expected)
result = sut(next)
}

Expand Down

0 comments on commit 3de4bae

Please sign in to comment.