I use AffiliateWindow service to import a feed of products for my Rails app. The feed is a compressed xml file, which can reach hundreds of megabytes in size, so I open a pipe in my app to `curl | gunzip` to parse it sequentially. Now, it works fine and I have an integration test that downloads the feed(a filtered down version), parses and stores the products.
The problem is that every other day it fails because some products disappear from the feed. What can I do about this? Something like a VCR for shell would be ideal. Or should I somehow create a fake service that starts along with the test at some url and returns the hard-coded feed?
I'd like to have this test as close to end-to-end as possible. I can't stub a method that creates a pipe or replace `curl` with `cat` because then I won't be testing if the URL is built correctly and if the shell command works at all.
--
You received this message because you are subscribed to a topic in the Google Groups "Objects on Rails" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/objects-on-rails/lmQv4LxXxnU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to objects-on-rai...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "Objects on Rails" group.
To unsubscribe from this group and stop receiving emails from it, send an email to objects-on-rai...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Objects on Rails" group.
To unsubscribe from this group and stop receiving emails from it, send an email to objects-on-rai...@googlegroups.com.