Test `Provider[]` errors when unknown

The global behaviour for passing an unknown service to a top level class
is raising an `ArgumentError` (after some debugging line).

We may as well test this globally.
This commit is contained in:
Paul Thornthwaite 2015-01-03 20:11:29 +00:00
parent 345e555e62
commit d8e62a60f5
1 changed files with 4 additions and 0 deletions

View File

@ -23,6 +23,10 @@ module Fog
assert_respond_to subject, :[]
end
it "#[] when unknown service is passed raises ArgumentError" do
assert_raises(ArgumentError) { subject[:bad_service] }
end
it "responds to services" do
assert_respond_to subject, :services
end