Skip to content

Commit

Permalink
fix: added missing kind property for Protocol (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyapuchka authored and krzysztofzablocki committed Dec 15, 2016
1 parent 9dfdb85 commit 78100ba
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Sourcery.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

/* Begin PBXBuildFile section */
09346DC81E02195300D6358C /* StructSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09346DC71E02195300D6358C /* StructSpec.swift */; };
0967DA611E0341400084F702 /* ProtocolSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0967DA601E0341400084F702 /* ProtocolSpec.swift */; };
58A8D89B0B5015671E6B526C /* Pods_SourceryTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6F74DA40979C0911C0573C7A /* Pods_SourceryTests.framework */; };
985E4D303A731C40BE326E5C /* Pods_Sourcery.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D7C9B21117B6C7EB409B9D49 /* Pods_Sourcery.framework */; };
CD0020EA1D8844AE001CB583 /* ParserSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = E291D78F72297EDB30B2A757 /* ParserSpec.swift */; };
Expand Down Expand Up @@ -61,6 +62,7 @@

/* Begin PBXFileReference section */
09346DC71E02195300D6358C /* StructSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StructSpec.swift; sourceTree = "<group>"; };
0967DA601E0341400084F702 /* ProtocolSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProtocolSpec.swift; sourceTree = "<group>"; };
3825CA349BD2B2AAB9605E7F /* Pods-Sourcery.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Sourcery.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Sourcery/Pods-Sourcery.debug.xcconfig"; sourceTree = "<group>"; };
47FBEB8D5AB4DA51522B302B /* Pods-Sourcery.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Sourcery.release.xcconfig"; path = "Pods/Target Support Files/Pods-Sourcery/Pods-Sourcery.release.xcconfig"; sourceTree = "<group>"; };
4E26A60E38FEA181642B97B4 /* Pods-SourceryTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SourceryTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-SourceryTests/Pods-SourceryTests.release.xcconfig"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -233,6 +235,7 @@
E291D8D53A557DA9E6D27C3C /* VariableSpec.swift */,
E291DF48D4FBBB43C1F7EF8A /* TypeSpec.swift */,
09346DC71E02195300D6358C /* StructSpec.swift */,
0967DA601E0341400084F702 /* ProtocolSpec.swift */,
E291D3D222F05C42C246CB73 /* EnumSpec.swift */,
);
path = Models;
Expand Down Expand Up @@ -493,6 +496,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
0967DA611E0341400084F702 /* ProtocolSpec.swift in Sources */,
CD0020EB1D8844B1001CB583 /* GeneratorSpec.swift in Sources */,
CD0020EA1D8844AE001CB583 /* ParserSpec.swift in Sources */,
E291D8BB621560C275813B1F /* SourcerySpec.swift in Sources */,
Expand Down
4 changes: 3 additions & 1 deletion Sourcery/Models/Protocol.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@

import Foundation

class Protocol: Type {}
class Protocol: Type {
override var kind: String { return "protocol" }
}
24 changes: 24 additions & 0 deletions SourceryTests/Models/ProtocolSpec.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import Quick
import Nimble
@testable import Sourcery

class ProtocolSpec: QuickSpec {
override func spec() {
describe ("Protocol") {
var sut: Type?

beforeEach {
sut = Protocol(name: "Foo", variables: [], inheritedTypes: [])
}

afterEach {
sut = nil
}

it("reports kind as protocol") {
expect(sut?.kind).to(equal("protocol"))
}

}
}
}

0 comments on commit 78100ba

Please sign in to comment.