mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
d8e62a60f5
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.
34 lines
807 B
Ruby
34 lines
807 B
Ruby
module Fog
|
|
module BinSpec
|
|
extend Minitest::Spec::DSL
|
|
|
|
it "responds to available?" do
|
|
assert_respond_to subject, :available?
|
|
end
|
|
|
|
it "responds to class_for" do
|
|
assert_respond_to subject, :class_for
|
|
end
|
|
|
|
it "#class_for raises ArgumentError for unknown services" do
|
|
assert_raises(ArgumentError) { subject.class_for(:unknown) }
|
|
end
|
|
|
|
it "responds to collections" do
|
|
skip if subject == ::Google
|
|
assert_respond_to subject, :collections
|
|
end
|
|
|
|
it "responds to []" do
|
|
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
|
|
end
|
|
end
|