[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Question about unit tests

Vincent Foley

5/3/2005 7:54:00 PM

Hello all,

I'm writing a small LiveJournal client, and I have a question for the
unit tests: how do I "manage" the password? To make sure that my login
method works well, I must provide the password in the test file, but
I'm not sure I'm quite comfortable with distributing my tests with that
password. Does anyone have any experience in dealing with things like
this? Do I just not distribute the tests?

3 Answers

pat eyler

5/3/2005 8:03:00 PM

0

On 5/3/05, Vincent Foley <vfoley@gmail.com> wrote:
> Hello all,
>
> I'm writing a small LiveJournal client, and I have a question for the
> unit tests: how do I "manage" the password? To make sure that my login
> method works well, I must provide the password in the test file, but
> I'm not sure I'm quite comfortable with distributing my tests with that
> password. Does anyone have any experience in dealing with things like
> this? Do I just not distribute the tests?
>

You might try contacting LiveJournal to see if they have a test account, or
if they would be willing to create one. Another option might be to read the
password in from a non-distributed file (just make sure you document how it
works so that other testers aren't suprised.).

>


--
thanks,
-pate
-------------------------
We are often unable to tell people what they need to know, because
they want to know something else, and would therefore only
misunderstand what we said
- the Raven (George MacDonald, Lilith)



Tom Copeland

5/3/2005 8:56:00 PM

0

On Wed, 2005-05-04 at 05:02 +0900, pat eyler wrote:
> Another option might be to read the
> password in from a non-distributed file (just make sure you document how it
> works so that other testers aren't suprised.).

Yup, or from an environment variable.

Yours,

Tom




Stephan Kämper

5/3/2005 9:21:00 PM

0

Tom Copeland wrote:
> On Wed, 2005-05-04 at 05:02 +0900, pat eyler wrote:
>
>>Another option might be to read the
>>password in from a non-distributed file (just make sure you document how it
>>works so that other testers aren't suprised.).
>
>
> Yup, or from an environment variable.
>

Or let the tests read it from a configuration file. YAML comes to mind..

Happy rubying

Stephan