                 make.propertyForKeyPath("testDictionary", type: .Dictionary)
                 make.propertyForKeyPath("testDate", type: .String, decoder: dateDecoder)
                 make.propertyForKeyPath("testURL", type: .URL)
-                make.propertyForKeyPath("sub-object", type: .Dictionary, decoder: TestDecoder())
+                make.propertyForKeyPath("sub-object", type: .Dictionary, decoder: ValidDecoder())
             }
 
             // Then

//  Copyright © 2015 Nike. All rights reserved.
//

import Foundation
import XCTest
import Elevate


// MARK: -

class TestDecoder: Decoder { // What does this decode so we can be better about naming
    func decodeObject(object: AnyObject) throws -> Any {
        let json = object as! [String: AnyObject]



    func testThatItParsesArray() {
        // Given
        let data = loadJSONDataForFileNamed("ArrayTest")

        // When
        do {
            let properties = try Parser.parseProperties(data: data) { make in
                make.propertyForKeyPath("rootString", type: .String)
                make.propertyForKeyPath("rootInt", type: .Int)
                make.propertyForKeyPath("items", type: .Array, decoder: ValidDecoder())
            }

            // Then
