                     it("should return a typeMismatch error") {
                         let value: NSDictionary = ["" : [:]]
                         let dict: NSDictionary = ["convertibleDictionaryProperty" : value]
-                        let mapper = KeyedMapper(JSON: dict, type: Model.self)
-                        let field = Model.Key.convertibleDictionaryProperty
+                        let mapper = KeyedMapper(JSON: dict, type: ModelWithDictionaryProperty.self)
+                        let field = ModelWithDictionaryProperty.Key.convertibleDictionaryProperty
                         let convertibleDictionary: [ConvertibleObject : [ConvertibleObject]]? = mapper.optionalFrom(field)
 
                         expect(convertibleDictionary).to(beNil())


                context("when all of the dictionary values can be cast to NSArrays") {
                    it("should return the correctly converted objects") {
                        let field = Model.Key.convertibleDictionaryProperty
                        let value: NSDictionary = ["" : [""]]
                        let dict: NSDictionary = [field.stringValue : value]
                        let mapper = KeyedMapper(JSON: dict, type: Model.self)
                        let convertibleDictionary: [ConvertibleObject : [ConvertibleObject]]? = mapper.optionalFrom(field)

                        expect(convertibleDictionary?.values.count) == value.count

fileprivate struct Model: Mappable {
    fileprivate enum Key: String, JSONKey {
        case convertibleProperty
    }

    fileprivate let convertibleProperty: ConvertibleObject

    fileprivate init(map: KeyedMapper<Model>) throws {
        try self.convertibleProperty = map.from(.convertibleProperty)
    }
}

fileprivate struct ModelWithArrayProperty: Mappable {
    fileprivate enum Key: String, JSONKey {
        case convertibleArrayProperty
    }

    fileprivate let convertibleArrayProperty: [ConvertibleObject]

    fileprivate init(map: KeyedMapper<ModelWithArrayProperty>) throws {
        try self.convertibleArrayProperty = map.from(.convertibleArrayProperty)
    }
}

fileprivate struct ModelWithDictionaryProperty: Mappable {
    fileprivate enum Key: String, JSONKey {
        case convertibleDictionaryProperty
    }

    fileprivate let convertibleDictionaryProperty: [ConvertibleObject : [ConvertibleObject]]

    fileprivate init(map: KeyedMapper<ModelWithDictionaryProperty>) throws {
        try self.convertibleDictionaryProperty = map.from(.convertibleDictionaryProperty)
    }
}
