diff --git a/SourceryTests/Models/VariableSpec.swift b/SourceryTests/Models/VariableSpec.swift index 959f8f7d2..8f466e83e 100644 --- a/SourceryTests/Models/VariableSpec.swift +++ b/SourceryTests/Models/VariableSpec.swift @@ -28,6 +28,11 @@ class VariableSpec: QuickSpec { expect(sut?.readAccess == AccessLevel.public.rawValue).to(beTrue()) } + it("has proper dynamic state") { + expect(Variable(name: "variable", typeName: TypeName(name: "Int"), accessLevel: (read: .public, write: .internal), isComputed: true, modifiers: [Modifier(name: "dynamic")]).isDynamic).to(beTrue()) + expect(Variable(name: "variable", typeName: TypeName(name: "Int"), accessLevel: (read: .public, write: .internal), isComputed: true, modifiers: [Modifier(name: "lazy")]).isDynamic).to(beFalse()) + } + it("has proper write access") { expect(sut?.writeAccess == AccessLevel.internal.rawValue).to(beTrue()) }