Skip to content

Commit

Permalink
[ec2] convert region specs to shindo
Browse files Browse the repository at this point in the history
  • Loading branch information
geemus committed May 23, 2010
1 parent 951a7d6 commit b26ad4f
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 21 deletions.
21 changes: 0 additions & 21 deletions spec/aws/requests/ec2/describe_regions_spec.rb

This file was deleted.

8 changes: 8 additions & 0 deletions tests/aws/helper.rb
Expand Up @@ -46,6 +46,14 @@ module Formats
'return' => ::Fog::Boolean
}

REGIONS = {
'regionInfo' => [{
'regionEndpoint' => String,
'regionName' => String
}],
'requestId' => String
}

SECURITY_GROUPS = {
'requestId' => String,
'securityGroupInfo' => [{
Expand Down
19 changes: 19 additions & 0 deletions tests/aws/requests/ec2/region_tests.rb
@@ -0,0 +1,19 @@
Shindo.tests('AWS::EC2 | region requests', ['aws']) do
tests('success') do

tests("#describe_regions").formats(AWS::EC2::Formats::REGIONS) do
AWS[:ec2].describe_regions.body
end

tests("#describe_regions('us-east-1')").formats(AWS::EC2::Formats::REGIONS) do
AWS[:ec2].describe_regions('us-east-1').body
end

end
tests('failure') do

tests("#describe_regions('not-a-region')").raises(Excon::Errors::BadRequest) do
AWS[:ec2].describe_regions('not-a-region').body
end
end
end

0 comments on commit b26ad4f

Please sign in to comment.