[AWS] Fix test and data pipeline issue

Test for `AWS[]` was buggy and to prove it when fixed it revealed that
the `data_pipeline` service was not returning the class not an instance
of the class.
This commit is contained in:
Paul Thornthwaite 2015-01-03 20:05:12 +00:00
parent 688741ace3
commit 746fbc1fd5
2 changed files with 3 additions and 3 deletions

View File

@ -79,7 +79,7 @@ module Fog
Fog::Logger.warning("AWS[:compute] is not recommended, use Compute[:aws] for portability")
Fog::Compute.new(:provider => 'AWS')
when :data_pipeline
Fog::AWS::DataPipeline
Fog::AWS::DataPipeline.new
when :ddb, :dynamodb
Fog::AWS::DynamoDB.new
when :dns

View File

@ -83,8 +83,8 @@ describe AWS do
describe "when service is recognised" do
it "returns correct instance" do
KEY_CLASS_MAPPING.each do |key, klass|
klass.stub(:new, true) do
assert klass, AWS[key]
klass.stub(:new, "#{klass} instance") do
assert_equal "#{klass} instance", AWS[key]
end
end
end