From d8e62a60f5af214a8016bbfa381f97ed89c3afca Mon Sep 17 00:00:00 2001 From: Paul Thornthwaite Date: Sat, 3 Jan 2015 20:11:29 +0000 Subject: [PATCH] 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. --- spec/helpers/bin.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spec/helpers/bin.rb b/spec/helpers/bin.rb index 5b72bdf6c..06cea0e10 100644 --- a/spec/helpers/bin.rb +++ b/spec/helpers/bin.rb @@ -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