[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
Родитель 688741ace3
Коммит 746fbc1fd5
2 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -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