rebar eunit and file path

Dan Reverri dan at basho.com
Tue Jan 4 09:57:59 EST 2011


Hi Paolo,

Use code:priv_dir/1 to get the location of your applications priv dir.


Daniel Reverri
Developer Advocate
Basho Technologies, Inc.
dan at basho.com


On Tue, Jan 4, 2011 at 6:02 AM, Paolo Negri <paolo.negri at wooga.net> wrote:

> Dear list,
>
> I'm a newbie so please let me know if this is not the appropriate list
> for this question.
> I'm using rebar to manage a project and I'm using it to run my eunits
> test using "rebar skip_deps=true eunit"
> I'm trying to figure out how to deal with file paths that keep working
> also when running eunit.
> In my application I need to read some xml configuration files which
> are under the priv/config directory.
> I noticed that any filename:absname file:get_cwd and so on refers to
> the .eunit tempdir while I run the eunit test and this breaks the
> logic that is building the path for the configuration files for the
> live application.
> What's the recommended way to deal with this problem?
>
> Thanks,
>
> Paolo
>
> --
> Engineering
> http://www.wooga.com | phone +49-30-8962 5058  | fax +49-30-8964 9064
>
> wooga GmbH | Saarbruecker Str. 38 | 10405 Berlin | Germany
> Sitz der Gesellschaft: Berlin; HRB 117846 B
> Registergericht Berlin-Charlottenburg
> Geschaeftsfuehrung: Jens Begemann, Philipp Moeser
>
> _______________________________________________
> rebar mailing list
> rebar at lists.basho.com
> http://lists.basho.com/mailman/listinfo/rebar_lists.basho.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/rebar_lists.basho.com/attachments/20110104/276f85d8/attachment.html>


More information about the rebar mailing list