> Be wary of HTTParty, it encourages you to couple your own code to its HTTP calls via a module. Enchantment is an anti-pattern IMO. Perhaps timely advice -- I find myself relying on HTTParty more & more, lately. Maybe I should have a rethink.
> Also, if you've packaged your code into a gem, you're pushing the boundaries of what are considered "your own types" Hmm. I've been wondering exactly what I got in terms of ease of reuse from packaging it into a gem, and that wondering has been taking on a more & more sceptical tone over the last couple of days. I have a few projects that use it, and wanted to add the desired functionality to the specs in the gem, update it, and have those projects update their bundles. The reality has been a nightmarish (although educational) tour through the workings of gems and bundler, and my experience in trying to cuke it, coupled with your advice about speccing it, leads me to suspect that I could well be better off just developing the functionality I need in each project & being happy that everything I need to test is complete & in there. > I'm interested to know, though, why do you think the mock service approach wouldn't really apply to this? Due to the fact that I'm needing to stub specific calls for specific responses, and would need therefore to seed the mock service & do all sorts of configuration through some sort of interface. I'm getting dangerously close to putting expectations into a stack test, aren't I? I could take a step back and use WebMock, but the service (unavoidably) accesses & updates records in batches of 200, and it's a proper PITA. > ... that would be implementing your own mocking expectation system, right? Yup, and not only a duplication of effort, but using expectations in a cuke is a bit of a no-no, so I've read. > If I understand right (which is by no means certain), then you're exposed to broad interface changes. In these situations, I like to check the assumptions in my spec files, as some will be stronger/less brittle than others. That would be things like the types & values returned from mocks and stubs, right? Currently, this is the other main thing that Cucumber does for me (the first is help make me a designer & developer, rather than just a coder!), which is why I really can't let the not-fully-tested state of affairs last too long. Is that what you're talking about, or are you suggesting another method could be used there? > I hope my reptiles were of some assistance. Indeed -- I more & more the virtues of herpetology! :) Cheers, Ashley -- very thought-provoking as always. Doug. -- You received this message because you are subscribed to the Google Groups "NWRUG" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nwrug-members?hl=en.
