Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of Faker and stuff #35

Open
dbraga opened this issue Oct 9, 2012 · 3 comments
Open

Use of Faker and stuff #35

dbraga opened this issue Oct 9, 2012 · 3 comments
Assignees

Comments

@dbraga
Copy link
Member

dbraga commented Oct 9, 2012

I saw you used the Faker gem in the .all of User.
I'm thinking it's a good idea to uniform it and i should use it also in group.
Do you think we should uniform also this behaviour ?

FAKE_GROUP_ID = "foo_id"
FAKE_GROUP_NAME = "foo_name"
FAKE_DESCRIPTION = "foo_description"
FAKE_EMAIL_PERMISSION = "Owner"
FAKE_MEMBER_ID = "foo_member"
FAKE_OWNER_ID = "foo_owner"

and then the use of this constants inside rspec methods? OR
if you don't like this way.. should i bring it back to the normal use like you did on User?

@ghost ghost assigned davide-targa Oct 9, 2012
@davide-targa
Copy link
Member

I am studying a way to test all the behaviors of each class.
Our current test suite is limited by the fact that we can test only some parts of the code. In particular we are not able to keep a state between tests (this is why in user_spec I used the mocking stuff). The problem is that (again) I was unable to test a considerable part of the code.
I am looking for a gem or some workaround to make tests simpler and to let us test all the behaviors.
In other words what I'm trying to achieve is a solution to your comment on issue #27...
Today I didn't go to work because of other engagements. I hope to find something useful tomorrow.
I'll let you know...

P.S.: Sorry for my english :)

@ghost ghost assigned dbraga Oct 9, 2012
@dbraga
Copy link
Member Author

dbraga commented Oct 9, 2012

That's ok. i just wanted to brain storm about the way we should write our unit tests.
Let me know if you have any new info about it !

@ghost ghost assigned davide-targa Oct 11, 2012
@davide-targa
Copy link
Member

In the new specs I wrote I used faker. It's convenient, but not essential.
You're the boss, it's your choice :)

@ghost ghost assigned dbraga Oct 16, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants