Skip to content

Commit

Permalink
Tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashley Frieze committed Dec 4, 2016
1 parent 105a04b commit 0bf8a53
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
3 changes: 1 addition & 2 deletions src/main/java/com/greghaskins/spectrum/Spectrum.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

import java.util.ArrayDeque;
import java.util.Deque;
import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Supplier;

/**
Expand Down Expand Up @@ -62,7 +61,7 @@ public interface Block extends com.greghaskins.spectrum.Block {
*
*/
static void compositeSpec(final String context, final com.greghaskins.spectrum.Block block) {
final Suite suite = getCurrentSuiteBeingDeclared().addAbortingSuite(context);
final Suite suite = getCurrentSuiteBeingDeclared().addCompositeSuite(context);
beginDefinition(suite, block);
}

Expand Down
11 changes: 2 additions & 9 deletions src/main/java/com/greghaskins/spectrum/Suite.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ private Suite addedToThis(Suite suite) {
return suite;
}

Suite addAbortingSuite(final String name) {
Suite addCompositeSuite(final String name) {
final Suite suite =
new CompositeTest(Description.createSuiteDescription(sanitise(name)), this,
this.tagging.clone());
Expand Down Expand Up @@ -232,14 +232,7 @@ public void run(final RunNotifier notifier) {
}

private void runSuite(final RunNotifier notifier) {
hooks.once().runAround(description, notifier, () -> doRunSuite(notifier));
}

private void doRunSuite(final RunNotifier notifier) {

NotifyingBlock.run(this.description, notifier, () -> {
runChildren(notifier);
});
hooks.once().runAround(description, notifier, () -> runChildren(notifier));
}

private void runChildren(final RunNotifier notifier) {
Expand Down

0 comments on commit 0bf8a53

Please sign in to comment.