Just me 2cents:
If you own Google::APIClient then this seems to be a normal mockist approach. If however, you do not own that class, and instead get it from a gem or some other 3rd party dependency, maybe check out VCR. You can then record a live traffic flow then play it back to validate the tests.
Aside from that, you could possibly refactor the tests a bit. One general guide I use is that a test should only have a single expectation. Aside from that, other suggestions would largely be my personal preference. I would stick with whatever guidelines your dev group has set forth.
Aaron
--
You received this message because you are subscribed to the Google Groups "rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rspec+un...@googlegroups.com.
To post to this group, send email to rs...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/adea0df9-ff10-4c87-af5e-97504ba45a54%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Just me 2cents:
If you own
Google::APIClientthen this seems to be a normal mockist approach. If however, you do not own that class, and instead get it from a gem or some other 3rd party dependency, maybe check out VCR. You can then record a live traffic flow then play it back to validate the tests.Aside from that, you could possibly refactor the tests a bit. One general guide I use is that a test should only have a single expectation. Aside from that, other suggestions would largely be my personal preference. I would stick with whatever guidelines your dev group has set forth.
--
You received this message because you are subscribed to the Google Groups "rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rspec+un...@googlegroups.com.
To post to this group, send email to rs...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/5716af22-076b-4ac0-a027-bab67c0ceb03%40googlegroups.com.