Created
February 6, 2012 15:48
-
-
Save ctataryn/1752773 to your computer and use it in GitHub Desktop.
jBehave Transaction Problem
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Transactional(readOnly = false, value = "dwTransactionManager") | |
@RunWith(SpringJUnit4ClassRunner.class) | |
@ContextConfiguration(locations = "/integration/test/config/spring/integrationTestBeans.xml") | |
public class RetrievePlayerInformationStoriesTest { | |
@Resource | |
private ApplicationContext context; | |
private Embedder embedder; | |
@Before | |
public void setup() { | |
// SpringStepsFactory will comb the classpath for POJOs annotated with | |
// @Given, @When... and add those as steps | |
embedder = new PlayerStoriesEmbedder(); | |
embedder.useCandidateSteps(new SpringStepsFactory(embedder | |
.configuration(), context).createCandidateSteps()); | |
} | |
@Test | |
public void runStoriesAsPaths() { | |
List<String> storyPaths = new StoryFinder().findPaths( | |
codeLocationFromClass(this.getClass()), "**/*.story", | |
"**/failing_before*.story"); | |
embedder.runStoriesAsPaths(storyPaths); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment