1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[tests] replace letters with letters and numbers with numbers in collection#get failure test

This commit is contained in:
geemus 2011-07-22 11:46:55 -05:00
parent 3cf54d48ef
commit 9553c3805e

View file

@ -38,12 +38,10 @@ def collection_tests(collection, params = {}, mocks_implemented = true)
tests('failure') do
if !Fog.mocking? || mocks_implemented
@identity = case @identity
when Integer
@identity.to_s.gsub(/\w/, Fog::Mock.random_numbers(1)).to_i
else
@identity.to_s.gsub(/\w/, Fog::Mock.random_letters(1))
end
@identity = @identity.to_s
@identity.gsub!(/[a-zA-Z]/) { Fog::Mock.random_letters(1) }
@identity.gsub!(/\d/) { Fog::Mock.random_numbers(1) }
@identity
end
tests("#get('#{@identity}')").returns(nil) do