Spaces in Path breaks LoadFromRelativeFile

Description

LoadFromRelativeFile function loadStoryAsTextfails to unescape URLs passed into the constructor that have escaped characters like %20 for a space. As a result, the story files cannot be found.

Test case snippet follows... add it to StoryLoaderBehaviour.java. Also need to add folder "foldername has spaces" to jbehave-core/src/test/java/org/jbehave/core/io/stories/ and copy MyPendingStory.txt into it. Also including revised code snippet for loadStoryAsText function. I didn't immediately see a way to do it without either checked exceptions or deprecated functions (ex UrlDecoder.decode(string)). Not sure if InvalidStoryResource was the right exception to convert to.

StoryLoaderBehaviour.java

LoadFromRelativeFile.java

Activity

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Created November 18, 2010 at 6:49 AM
Updated January 29, 2011 at 9:41 AM
Resolved January 29, 2011 at 9:41 AM