-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from raniejade/group-tagging
Implement focused and pending groups
- Loading branch information
Showing
31 changed files
with
710 additions
and
228 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
kspec-core/src/main/kotlin/io/polymorphicpanda/kspec/hook/AroundHook.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
package io.polymorphicpanda.kspec.hook | ||
|
||
import io.polymorphicpanda.kspec.context.ExampleContext | ||
import io.polymorphicpanda.kspec.context.Context | ||
import io.polymorphicpanda.kspec.tag.Tag | ||
|
||
/** | ||
* @author Ranie Jade Ramiso | ||
*/ | ||
class AroundHook(val block: (ExampleContext, Chain) -> Unit, tags: Set<Tag>): Hook(tags) { | ||
fun execute(example: ExampleContext, chain: Chain) { | ||
block(example, chain) | ||
class AroundHook(val block: (Context, Chain) -> Unit, tags: Set<Tag>): Hook(tags) { | ||
fun execute(context: Context, chain: Chain) { | ||
block(context, chain) | ||
} | ||
} |
6 changes: 3 additions & 3 deletions
6
kspec-core/src/main/kotlin/io/polymorphicpanda/kspec/hook/Chain.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
kspec-core/src/main/kotlin/io/polymorphicpanda/kspec/hook/Hook.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
package io.polymorphicpanda.kspec.hook | ||
|
||
import io.polymorphicpanda.kspec.context.ExampleContext | ||
import io.polymorphicpanda.kspec.context.Context | ||
import io.polymorphicpanda.kspec.tag.Tag | ||
|
||
/** | ||
* @author Ranie Jade Ramiso | ||
*/ | ||
abstract class Hook(val tags: Set<Tag>) { | ||
fun handles(example: ExampleContext): Boolean { | ||
return example.tags.containsAll(tags) | ||
fun handles(context: Context): Boolean { | ||
return context.tags.containsAll(tags) | ||
} | ||
} |
8 changes: 4 additions & 4 deletions
8
kspec-core/src/main/kotlin/io/polymorphicpanda/kspec/hook/SimpleHook.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
package io.polymorphicpanda.kspec.hook | ||
|
||
import io.polymorphicpanda.kspec.context.ExampleContext | ||
import io.polymorphicpanda.kspec.context.Context | ||
import io.polymorphicpanda.kspec.tag.Tag | ||
|
||
/** | ||
* @author Ranie Jade Ramiso | ||
*/ | ||
class SimpleHook(val block: (ExampleContext) -> Unit, tags: Set<Tag>): Hook(tags) { | ||
fun execute(example: ExampleContext) { | ||
block(example) | ||
class SimpleHook(val block: (Context) -> Unit, tags: Set<Tag>): Hook(tags) { | ||
fun execute(context: Context) { | ||
block(context) | ||
} | ||
} |
Oops, something went wrong.