mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00

We require setting up MiniSpec and `fog` in each spec and this just feels cleaner way of doing it. Adding Coverage next and we don't want the code in EVERY spec.
33 lines
706 B
Ruby
33 lines
706 B
Ruby
require "spec_helper"
|
|
require "fog/bin"
|
|
require "helpers/bin"
|
|
|
|
describe Atmos do
|
|
include Fog::BinSpec
|
|
|
|
let(:subject) { Atmos }
|
|
|
|
describe "#services" do
|
|
it "includes all services" do
|
|
assert_includes Atmos.services, :storage
|
|
end
|
|
end
|
|
|
|
describe "#class_for" do
|
|
describe "when requesting storage service" do
|
|
it "returns correct class" do
|
|
assert_equal Fog::Storage::Atmos, Atmos.class_for(:storage)
|
|
end
|
|
end
|
|
end
|
|
|
|
describe "#[]" do
|
|
describe "when requesting storage service" do
|
|
it "returns instance" do
|
|
Fog::Storage::Atmos.stub(:new, "instance") do
|
|
assert_equal "instance", Atmos[:storage]
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|