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

Assignee

Paul Hammant

Reporter

Leif Carlsen

Labels

None

Components

Fix versions

Affects versions

Priority

Minor
Configure