         XCTAssertFalse(routeWasHandled)
     }
     
+    func test_evaluateURL_returnsFalseForBadURL() {
+        let router = Router()
+        let url = NSURL(string: "::")!
+        
+        let routeWasHandled = router.evaluateURL(url)
+        XCTAssertFalse(routeWasHandled)
+    }
+    
     func test_evaluateURL_executesActionWithMultipleURLComponents() {
         let router = Router()
         let handlerExpectation = expectationWithDescription("route handler should run")

        let routeWasHandled = router.evaluateURLString("scheme://walmart.com")
        XCTAssertFalse(routeWasHandled)
    }
}

// MARK: - routesForComponents Tests

extension RouterTests {
    func test_routesForComponents_returnsEmptyResultsForBogusComponents() {
        let router = Router()
        let results = router.routesForComponents(["walmart.com", "foo"])
        
        XCTAssertTrue(results.isEmpty)
    }
    
    func test_routesForComponents_returnsEmptyResultsForEmptyComponents() {
        let router = Router()
        let results = router.routesForComponents([])
        
        XCTAssertTrue(results.isEmpty)
    }
    
    func test_routesForComponents_returnsNamedRoutesForValidComponents() {
        let router = Router()
        let route = Route("walmart.com", type: .Other).route("foo", type: .Other)
        router.register(route)
        
        let results = router.routesForComponents(["walmart.com", "foo"])
        
        XCTAssertFalse(results.isEmpty)
        XCTAssertEqual(results.count, 2)
        XCTAssertEqual(results[0].name, "walmart.com")
        XCTAssertEqual(results[1].name, "foo")
    }
}

extension RouterTests {
    func test_routesForURL__returnsNamedRoutesForValidURL() {
        let router = Router()
        let route = Route("walmart.com", type: .Other).route("foo", type: .Other)
        router.register(route)
        let url = NSURL(string: "scheme://walmart.com/foo")!
        
        let results = router.routesForURL(url)
        
        XCTAssertFalse(results.isEmpty)
        XCTAssertEqual(results.count, 2)
        XCTAssertEqual(results[0].name, "walmart.com")
        XCTAssertEqual(results[1].name, "foo")
    }
    
    func test_routesForURL__returnsEmptyResultsForBadURL() {
        let router = Router()
        let url = NSURL(string: "::")!
        
        let results = router.routesForURL(url)
        
        XCTAssertTrue(results.isEmpty)
    }
}

