зеркало из https://github.com/github/fog.git
[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:
Родитель
688741ace3
Коммит
746fbc1fd5
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче