Skip to content

Update SpecSuite.cls #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/SpecSuite.cls
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Public Description As String

Public BeforeEachCallback As String
Public BeforeEachCallbackArgs As Variant
Private pCounter As Long

Public Property Get SpecsCol() As Collection
If pSpecsCol Is Nothing Then: Set pSpecsCol = New Collection
Expand All @@ -54,6 +55,8 @@ End Property
Public Function It(Description As String, Optional SpecId As String = "") As SpecDefinition
Dim Spec As New SpecDefinition

pCounter = pCounter + 1

' Call BeforeEach if defined
ExecuteBeforeEach

Expand All @@ -64,6 +67,10 @@ Public Function It(Description As String, Optional SpecId As String = "") As Spe
Set It = Spec
End Function

Public Sub TotalTests()
Debug.Print "Total tests:" & pCounter
End Sub

''
' Setup a callback to run before each spec
'
Expand Down