         
         do {
             try keychain.delete(account: account)
-            
         } catch let error {
             XCTFail("delete call should not fail. Unexpected error. \(error)")
         }
         
+        deleteAllItems(service: testServiceName)
     }
     
     func test_delete_throwsErrorWhenUnableToDeleteItem() {

    func test_delete_doesNotThrowErrorWhenDeletingKeychainItem() {
        let value = "test_delete_doesNotThrowErrorWhenDeletingKeychainItem-value"
        let account = "test_delete_doesNotThrowErrorWhenDeletingKeychainItem-account"
        let keychain = Keychain(service: testServiceName)
        
        do {
            try keychain.set(value, account: account)

private let testServiceName = "ELKeychainTests-test-service"

class KeychainTests: XCTestCase {
    override func setUp() {
        deleteAllItems(service: testServiceName)
    }
    
    func deleteAllItems(service service: String) {
        let query = [
            kSecClass as String : kSecClassGenericPassword,
            kSecAttrService as String : service]
        
        let _ = try? Keychain.delete(matching: query)
    }
    
    func test_setString_doesNotThrowErrors() {
