From fa77c2ff1dadba6939e91ef98bea26677cbf5c6d Mon Sep 17 00:00:00 2001 From: geemus Date: Tue, 16 Aug 2011 12:22:15 -0500 Subject: [PATCH] [tests] non-destructively generate id for get('fake') == nil tests --- lib/fog/compute/requests/aws/describe_volumes.rb | 1 + tests/helpers/collection_helper.rb | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/fog/compute/requests/aws/describe_volumes.rb b/lib/fog/compute/requests/aws/describe_volumes.rb index 6d1747b5e..5801cbc43 100644 --- a/lib/fog/compute/requests/aws/describe_volumes.rb +++ b/lib/fog/compute/requests/aws/describe_volumes.rb @@ -72,6 +72,7 @@ module Fog 'instance-id' => 'instanceId', 'status' => 'status' } + for filter_key, filter_value in filters if attachment_key = filter_key.split('attachment.')[1] aliased_key = attachment_aliases[filter_key] diff --git a/tests/helpers/collection_helper.rb b/tests/helpers/collection_helper.rb index 7f4447121..7dd1a790e 100644 --- a/tests/helpers/collection_helper.rb +++ b/tests/helpers/collection_helper.rb @@ -39,8 +39,8 @@ def collection_tests(collection, params = {}, mocks_implemented = true) if !Fog.mocking? || mocks_implemented @identity = @identity.to_s - @identity.gsub!(/[a-zA-Z]/) { Fog::Mock.random_letters(1) } - @identity.gsub!(/\d/) { Fog::Mock.random_numbers(1) } + @identity = @identity.gsub(/[a-zA-Z]/) { Fog::Mock.random_letters(1) } + @identity = @identity.gsub(/\d/) { Fog::Mock.random_numbers(1) } @identity end