Skip to content

Commit

Permalink
adding check for dry-run option back
Browse files Browse the repository at this point in the history
reverted initial commit to get rid of test changes, which were included
accidentally
  • Loading branch information
wjpowell committed Jan 2, 2013
1 parent d347213 commit f6676b4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions core/src/main/java/cucumber/runtime/Runtime.java
Expand Up @@ -180,9 +180,11 @@ public void runAfterHooks(Reporter reporter, Set<Tag> tags) {
}

private void runHooks(List<HookDefinition> hooks, Reporter reporter, Set<Tag> tags, boolean isBefore) {
for (HookDefinition hook : hooks) {
runHookIfTagsMatch(hook, reporter, tags, isBefore);
}
if (!runtimeOptions.dryRun) {
for (HookDefinition hook : hooks) {
runHookIfTagsMatch(hook, reporter, tags, isBefore);
}
}
}

private void runHookIfTagsMatch(HookDefinition hook, Reporter reporter, Set<Tag> tags, boolean isBefore) {
Expand Down

0 comments on commit f6676b4

Please sign in to comment.