Open dbraga opened 12 years ago
work in progress...
I took a quick look. Let's take the save as an example:
After the normal save on spec you add (way to go!) : it "should return false if you try to save an invalid Group" do.
My concern is that we don't have a valid way to test random failures from google api. One example could be when you try to save a group that already exists on google groups. How do we fake that? We use our stub that mimicry the right response but we don't do the same for failures.
Another problem is to subsequential operations like update. we could test if we really updated the group or the user except we can't because our "find" stub is engineered to response always the same right thing
Last commit regards #26 not #27 . my bad
Finally I can confirm that we have a way to test all the behaviors of all the methods. Thank you VCR Have a look at specs/user_specs.rb only 350-400 LOC to test ALL the User class! Pretty impressive! :+1:
A lot of code replication (but seems to me its necessary because it's xml response/requests) Needs reviewal from your point of view