<commit_before>import Quick
import Nimble

import Dobby

class MockSpec: QuickSpec {
    override func spec() {
        var mock: Mock<(Int, Int)>!

        beforeEach {
            mock = Mock()
        }

        describe("Verification") {
            it("succeeds if all expectations match an interaction") {
                mock.expect(matches((any(), 1)))
                mock.expect(matches((any(), matches { $0 == 2 })))
                mock.record((0, 1))
                mock.record((0, 2))
                mock.verify()
            }

            it("fails if an expectation is not matched") {
                mock.expect(matches((any(), equals(3))))
                mock.verify { (message, _, _) in
                    expect(message).to(equal("Expectation <(_, 3)> not matched"))
                }
            }

            it("fails if an interaction is not matched") {
                var failureMessageSent = false
                mock.record((4, 5)) { (message, _, _) in
                    failureMessageSent = true
                    expect(message).to(equal("Received unexpected Interaction <(4, 5)>"))
                }
                expect(failureMessageSent).to(beTrue())
            }<commit_msg>Make sure that the test is no false positive<commit_after>import Quick
import Nimble

import Dobby

class MockSpec: QuickSpec {
    override func spec() {
        var mock: Mock<(Int, Int)>!

        beforeEach {
            mock = Mock()
        }

        describe("Verification") {
            it("succeeds if all expectations match an interaction") {
                mock.expect(matches((any(), 1)))
                mock.expect(matches((any(), matches { $0 == 2 })))
                mock.record((0, 1))
                mock.record((0, 2))
                mock.verify()
            }

            it("fails if an expectation is not matched") {
                var failureMessageSent = false
                mock.expect(matches((any(), equals(3))))
                mock.verify { (message, _, _) in
                    failureMessageSent = true
                    expect(message).to(equal("Expectation <(_, 3)> not matched"))
                }
                expect(failureMessageSent).to(beTrue())
            }

            it("fails if an interaction is not matched") {
                var failureMessageSent = false
                mock.record((4, 5)) { (message, _, _) in
                    failureMessageSent = true
                    expect(message).to(equal("Received unexpected Interaction <(4, 5)>"))
                }
                expect(failureMessageSent).to(beTrue())
            }
{'fraction_non_alphanumeric': 0.11843107387661843, 'fraction_numerical': 0.009900990099009901, 'mean_word_length': 1.5019047619047619, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4299910', 'n_tokens_mistral': 692, 'n_tokens_neox': 629, 'n_words': 166}