Sha256: 3949bd6c04424d252eb15919339f14b57374a3e0c8e8d1863e12979328814450
Contents?: true
Size: 1.37 KB
Versions: 2
Compression:
Stored size: 1.37 KB
Contents
require 'spec_helper' describe Docker do subject { Docker } it { should be_a Module } its(:options) { should == { :port => 4243 } } its(:url) { should == 'http://localhost' } its(:connection) { should be_a Docker::Connection } describe '#reset_connection!' do before { subject.connection } it 'sets the @connection to nil' do expect { subject.reset_connection! } .to change { subject.instance_variable_get(:@connection) } .to nil end end [:options=, :url=].each do |method| describe "##{method}" do after(:all) do subject.options = { :port => 4243 } subject.url = 'http://localhost' end it 'calls #reset_connection!' do subject.should_receive(:reset_connection!) subject.public_send(method, {}) end end end describe '#version' do let(:version) { subject.version } it 'returns the version as a Hash', :vcr do version.should be_a Hash version.keys.sort.should == %w[GoVersion Version] end end describe '#info' do let(:info) { subject.info } let(:keys) do ["Containers", "Debug", "Images", "MemoryLimit", "NFd", "NGoroutines"] end it 'returns the info as a Hash', :vcr do info.should be_a Hash info.keys.sort.should == keys end end describe '#auth' do it 'logs in' do pending end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
docker-api-0.0.3 | spec/docker_spec.rb |
docker-api-0.0.2 | spec/docker_spec.rb |