Quick / Nimble

A Matcher Framework for Swift and Objective-C
https://quick.github.io/Nimble/documentation/nimble/
Apache License 2.0
4.8k stars 601 forks source link

Both notTo and to pass for equality with URL #996

Closed lwoydziak closed 2 years ago

lwoydziak commented 2 years ago

What did you do?

import Quick
import Nimble

final class Broken: XCTestCase {
    func testBrokenExpectation(){
        expect(URL(string: "https://example.blah/")!).notTo(equal(URL(string: "https://another.com")!))
        expect(URL(string: "https://example.blah/")!).to(equal(URL(string: "https://another.com")!))
    }
}

What did you expect to happen?

Expected following to cause test failure:

expect(URL(string: "https://example.blah/")!).to(equal(URL(string: "https://another.com")!))

What actually happened instead?

Both lines passed.

Environment

List the software versions you're using:

Please also mention which package manager you used and its version. Delete the other package managers in this list:

Project that demonstrates the issue

See the snippet above.

lwoydziak commented 2 years ago

Sorry for this issue, the error was buried in previous console output.