On Fri, Oct 5, 2012 at 1:28 AM, RobF <
rob...@yahoo.com> wrote:
> Hi,
>
> I'm actually running cuke4duke.
Actually as in "I can't use Cucumber-JVM"?
> Suppose my feature file hierarchy is rooted
> at C:\cuke4duke\features
> and that I have 2 subdirectories here A and B which contain A.feature and
> B.feature and also A.txt and B.txt.
> I want to have a step in A.feature that reads something like:
> Then extract information from A.txt
> The implementation behind this step would then look for A.txt in the same
> directory as A.feature. How do I find this directory?
>
There is no way for a step definition to know anything about the
feature/scenario that invoked it I'm afraid. I suggest you either move
all the .txt files to the same dir, or pass the (relative) path from
your step to your stepdef using an argument:
Given /I have a file named (.*)/
Aslak
> Any suggestions would be greatly appreciated.
>
> Thanks, Rob
>
> --
> -- Rules --
>
> 1) Please prefix the subject with [Ruby], [JVM] or [JS].
> 2) Please use interleaved answers
>
http://en.wikipedia.org/wiki/Posting_style#Interleaved_style
> 3) If you have a question, don't reply to an existing message. Start a new
> topic instead.
>
> You received this message because you are subscribed to the Google Groups
> Cukes group. To post to this group, send email to
cu...@googlegroups.com. To
> unsubscribe from this group, send email to
>
cukes+un...@googlegroups.com. For more options, visit this group at
>
https://groups.google.com/d/forum/cukes?hl=en
>
>