From f6676b44369d5aec3fa869b2d03be96dda9cf154 Mon Sep 17 00:00:00 2001 From: William Powell Date: Tue, 1 Jan 2013 19:52:32 -0500 Subject: [PATCH] adding check for dry-run option back reverted initial commit to get rid of test changes, which were included accidentally --- core/src/main/java/cucumber/runtime/Runtime.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/cucumber/runtime/Runtime.java b/core/src/main/java/cucumber/runtime/Runtime.java index 3d9a204aa0..5e6983a53b 100644 --- a/core/src/main/java/cucumber/runtime/Runtime.java +++ b/core/src/main/java/cucumber/runtime/Runtime.java @@ -180,9 +180,11 @@ public void runAfterHooks(Reporter reporter, Set tags) { } private void runHooks(List hooks, Reporter reporter, Set 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 tags, boolean isBefore) {