Details
-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Duplicate
-
Affects Version/s: 3.5.4
-
Fix Version/s: 3.6
-
Component/s: Core, Core Examples
-
Labels:
-
Environment:Windows 7 Enterprise 64-bit, Version 6.1 (Build 7600)
Ubuntu Linux 10.04.3 LTS
-
Number of attachments :
Description
I discovered this in the Guice examples, but it's not a problem limited to Guice. Take this code that searches for stories:
new StoryFinder().findPaths( CodeLocations.codeLocationFromPath( "resources" ).getFile(), asList( "*/.story" ), null );
If the "resources" folder resides in a base path that contains a space, the StoryFinder will fail to locate the stories. This is because codeLocationFromPath() uses a java.net.URL object under-the-hood to URL encode the path, converting spaces to %20. Thus, jBehave will look here:
c:\jbehave\folder%20with%20spaces\resources
for stories located here:
c:\jbehave\folder with spaces\resources
This is also a problem for reports. If relative paths are used in any form, when jBehave converts them to full paths, the paths are URL-encoded. This in turn causes our Hudson builds to fail because it cannot locate the reports.
The workaround for this is to not use CodeLocations to locate stories, and to use a Hudson project with no spaces, but jBehave really should support paths with spaces. This occurs on both Windows and Linux.
Activity
Field | Original Value | New Value |
---|---|---|
Status | Open [ 1 ] | Resolved [ 5 ] |
Fix Version/s | 3.6 [ 17721 ] | |
Resolution | Duplicate [ 3 ] |
this is the same issue as
JBEHAVE-712, this is fixed in the snapshot build, if you want to try thatyou currently have to compile the source yourself, however, since the CI build is not working