[rspec-users] How to approach testing automated processing
lists at ruby-forum.com
Sat Apr 18 20:07:20 EDT 2009
Zach Dennis wrote:
> On Sat, Apr 18, 2009 at 7:02 PM, James Byrne <lists at ruby-forum.com>
>> �To Reduce Costs and Protect Revenue
>> I should construct the feature step definitions and how I would test
>> this. �I figure I just have to take as given that cron works because
>> that is not my code. �But how best to test that the rest works?
> I would probably approach it this way.
> - Make a local copy of the RSS feed you're expecting to import
Yup, done that. Mainly because I now have fixed data to test against but
in the exact format that the feed supplies.
> - Write a feature which specifies the command you want to run. This
> command would be the same command you used with cron. I would make it
> take a path or URI as an argument.
Ahh. I had not thought of that.
> - Have the feature ensure the the right number of records were created
> based on your local copy of the feed
> - Drop down to RSpec and re-use the local copy of the feed to ensure
> that all of the little details (if you have little details) are
> properly imported
> When that is done ...
> That general approach has worked well in the past (and I say past
> because before Cucumber existed I still wrote features/scenarios with
> StoryRunner, and before that my team had tooled its own ad hoc story
It certainly does. Thanks.
Posted via http://www.ruby-forum.com/.
More information about the rspec-users