Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- jbehave titbits
- ===============
- * include - exclude stories based on file pattern
- * include - exclude stories based on annotation
- */
- public class StoryRunner {
- public void runStories() {
- Embedder storyEmbedder = new LottoStoryEmbedder();
- storyEmbedder.useMetaFilters(metaFilters());
- List<String> storyPaths = storyPaths();
- storyEmbedder.runStoriesAsPaths(storyPaths);
- }
- protected List<String> storyPaths() {
- return new StoryFinder()
- .findPaths(codeLocationFromClass(this.getClass()).getFile(),
- //include
- Arrays.asList("**/*.story"),
- //exclude
- Arrays.asList("")
- );
- }
- protected List<String> metaFilters() {
- return Arrays.asList
- (
- // "-" means exclude
- "-skip",
- System.getProperty("metafilter")
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement