From 1978c8a1223571e3fc1477b5381f4c6c3d8756a9 Mon Sep 17 00:00:00 2001 From: Kyle Rames Date: Wed, 13 Feb 2013 10:37:33 -0600 Subject: [PATCH 1/2] [Rackspace|Storage] This tests consistently fails on either ruby 1.8.7 or ruby 1.9.3 because hash order is indeterminate. I believe the spirt of this test is to ensure that only one header value is generated and thus I have updated the test to reflect that. --- tests/rackspace/models/storage/file_tests.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/rackspace/models/storage/file_tests.rb b/tests/rackspace/models/storage/file_tests.rb index 62c8a2af0..5bd965aed 100644 --- a/tests/rackspace/models/storage/file_tests.rb +++ b/tests/rackspace/models/storage/file_tests.rb @@ -113,9 +113,11 @@ Shindo.tests('Fog::Rackspace::Storage | file', ['rackspace']) do @instance.metadata['foo-bar'] = 'baz' @instance.metadata[:'foo_bar'] = 'bref' - tests("should only support one value per metadata key").returns('bref') do + tests("should only support one value per metadata key").returns(true) do @instance.save - object_meta_attributes['X-Object-Meta-Foo-Bar'] + metadata = object_meta_attributes + returns(1) { metadata.size } + metadata.has_key? 'X-Object-Meta-Foo-Bar' end end From 822b219bd3cc4cf6e0971280be4c174667020df0 Mon Sep 17 00:00:00 2001 From: Kyle Rames Date: Wed, 13 Feb 2013 12:18:52 -0600 Subject: [PATCH 2/2] [rackspace|storage] removing test of dubious distinction per geemus --- tests/rackspace/models/storage/file_tests.rb | 9 --------- 1 file changed, 9 deletions(-) diff --git a/tests/rackspace/models/storage/file_tests.rb b/tests/rackspace/models/storage/file_tests.rb index 5bd965aed..42190d3e1 100644 --- a/tests/rackspace/models/storage/file_tests.rb +++ b/tests/rackspace/models/storage/file_tests.rb @@ -110,15 +110,6 @@ Shindo.tests('Fog::Rackspace::Storage | file', ['rackspace']) do @instance.save object_meta_attributes['X-Object-Meta-Foo-Bar'] end - - @instance.metadata['foo-bar'] = 'baz' - @instance.metadata[:'foo_bar'] = 'bref' - tests("should only support one value per metadata key").returns(true) do - @instance.save - metadata = object_meta_attributes - returns(1) { metadata.size } - metadata.has_key? 'X-Object-Meta-Foo-Bar' - end end end