Skip to content

Commit

Permalink
Fix spec suite test to run with specific feature
Browse files Browse the repository at this point in the history
Spec suite test blacklist diff verification needs to be disabled if
we are running a specific feature and/or scenario.
  • Loading branch information
henriknyman committed Sep 7, 2017
1 parent 9973563 commit f769649
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
Expand Up @@ -56,11 +56,13 @@ public abstract static class Base
@AfterClass
public static void teardown()
{
Set<String> diff = BlacklistPlugin.getDiffBetweenBlacklistAndUsedScenarios();
if ( !diff.isEmpty() )
if ( FEATURE_TO_RUN.isEmpty() && SCENARIO_NAME_REQUIRED.isEmpty() )
{
fail( "The following scenarios were blacklisted but no test corresponds to that name:\n"
+ String.join( "\n", diff ) );
Set<String> diff = BlacklistPlugin.getDiffBetweenBlacklistAndUsedScenarios();
if ( !diff.isEmpty() )
{
fail( "The following scenarios were blacklisted but no test corresponds to that name:\n" + String.join( "\n", diff ) );
}
}
}
}
Expand Down
Expand Up @@ -56,10 +56,13 @@ public abstract static class Base
@AfterClass
public static void teardown()
{
Set<String> diff = BlacklistPlugin.getDiffBetweenBlacklistAndUsedScenarios();
if ( !diff.isEmpty() )
if ( FEATURE_TO_RUN.isEmpty() && SCENARIO_NAME_REQUIRED.isEmpty() )
{
fail( "The following scenarios were blacklisted but no test corresponds to that name:\n" + String.join( "\n", diff ) );
Set<String> diff = BlacklistPlugin.getDiffBetweenBlacklistAndUsedScenarios();
if ( !diff.isEmpty() )
{
fail( "The following scenarios were blacklisted but no test corresponds to that name:\n" + String.join( "\n", diff ) );
}
}
}
}
Expand Down

0 comments on commit f769649

Please sign in to comment.