Skip to content

Commit

Permalink
Verify the specification is given to specification context
Browse files Browse the repository at this point in the history
  • Loading branch information
Vampire committed Jun 9, 2023
1 parent 9874136 commit 340004a
Showing 1 changed file with 51 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ class FooSpec extends Specification {
assert method
assert !method.reflection
assert !method.name
instance.specificationContext.with {
assert currentSpec
}
}
proceed(it, 'shared initializer', "$it.spec.name")
}
Expand All @@ -176,6 +179,9 @@ class FooSpec extends Specification {
assert method
assert method.reflection
assert method.name
instance.specificationContext.with {
assert currentSpec
}
}
proceed(it, 'shared initializer method', "$it.spec.name.$it.method.name()")
}
Expand All @@ -189,6 +195,9 @@ class FooSpec extends Specification {
assert method
assert !method.reflection
assert !method.name
instance.specificationContext.with {
assert currentSpec
}
}
proceed(it, 'specification', "$it.spec.name")
}
Expand All @@ -202,6 +211,9 @@ class FooSpec extends Specification {
assert method
assert !method.reflection
assert !method.name
instance.specificationContext.with {
assert currentSpec
}
}
proceed(it, 'setup spec', "$it.spec.name")
}
Expand All @@ -215,6 +227,9 @@ class FooSpec extends Specification {
assert method
assert method.reflection
assert method.name
instance.specificationContext.with {
assert currentSpec
}
}
proceed(it, 'setup spec method', "$it.spec.name.$it.method.name()")
}
Expand All @@ -228,6 +243,9 @@ class FooSpec extends Specification {
assert method
assert !method.reflection
assert !method.name
instance.specificationContext.with {
assert currentSpec
}
}
proceed(it, 'feature', "$it.spec.name.$it.feature.name")
}
Expand All @@ -241,6 +259,9 @@ class FooSpec extends Specification {
assert method
assert !method.reflection
assert !method.name
instance.specificationContext.with {
assert currentSpec
}
}
proceed(it, 'initializer', "$it.spec.name.$it.feature.name")
}
Expand All @@ -254,6 +275,9 @@ class FooSpec extends Specification {
assert method
assert method.reflection
assert method.name
instance.specificationContext.with {
assert currentSpec
}
}
proceed(it, 'initializer method', "$it.spec.name.$it.feature.name.$it.method.name()")
}
Expand All @@ -267,6 +291,9 @@ class FooSpec extends Specification {
assert method
assert !method.reflection
assert !method.name
instance.specificationContext.with {
assert currentSpec
}
}
proceed(it, 'iteration', "$it.spec.name.$it.feature.name[#$it.iteration.iterationIndex]")
}
Expand All @@ -280,6 +307,9 @@ class FooSpec extends Specification {
assert method
assert !method.reflection
assert !method.name
instance.specificationContext.with {
assert currentSpec
}
}
proceed(it, 'setup', "$it.spec.name.$it.feature.name[#$it.iteration.iterationIndex]")
}
Expand All @@ -293,6 +323,9 @@ class FooSpec extends Specification {
assert method
assert method.reflection
assert method.name
instance.specificationContext.with {
assert currentSpec
}
}
proceed(it, 'setup method', "$it.spec.name.$it.feature.name[#$it.iteration.iterationIndex].$it.method.name()")
}
Expand All @@ -306,6 +339,9 @@ class FooSpec extends Specification {
assert method
assert method.reflection
assert method.name
instance.specificationContext.with {
assert currentSpec
}
}
proceed(it, 'feature method', "$it.spec.name.$it.feature.name[#$it.iteration.iterationIndex].$it.method.name()")
}
Expand All @@ -319,6 +355,9 @@ class FooSpec extends Specification {
assert method
assert !method.reflection
assert !method.name
instance.specificationContext.with {
assert currentSpec
}
}
proceed(it, 'cleanup', "$it.spec.name.$it.feature.name[#$it.iteration.iterationIndex]")
}
Expand All @@ -332,6 +371,9 @@ class FooSpec extends Specification {
assert method
assert method.reflection
assert method.name
instance.specificationContext.with {
assert currentSpec
}
}
proceed(it, 'cleanup method', "$it.spec.name.$it.feature.name[#$it.iteration.iterationIndex].$it.method.name()")
}
Expand All @@ -345,6 +387,9 @@ class FooSpec extends Specification {
assert method
assert !method.reflection
assert !method.name
instance.specificationContext.with {
assert currentSpec
}
}
proceed(it, 'cleanup spec', "$it.spec.name")
}
Expand All @@ -358,6 +403,9 @@ class FooSpec extends Specification {
assert method
assert method.reflection
assert method.name
instance.specificationContext.with {
assert currentSpec
}
}
proceed(it, 'cleanup spec method', "$it.spec.name.$it.method.name()")
}
Expand All @@ -377,6 +425,9 @@ class FooSpec extends Specification {
assert method
assert method.reflection
assert method.name
instance.specificationContext.with {
assert currentSpec
}
}
proceed(it, 'fixture method', "$it.spec.name${it.feature?.name?.with { name -> ".$name[#$it.iteration.iterationIndex]" } ?: ''}.$it.method.name()")
}
Expand Down

0 comments on commit 340004a

Please sign in to comment.