Sha256: 7256b8a00810c44bf21d434d2d4f4fc6a090ba0f39167a42cdebe60d4f600ef9
Contents?: true
Size: 799 Bytes
Versions: 1
Compression:
Stored size: 799 Bytes
Contents
require 'spec_helper' describe Libvirt::Ruby::StoragePool do let(:storage_pool) { Libvirt::Ruby::StoragePool } context "when calling method #dispatcher" do before :each do storage_pool.stub(:attach_function).with("virStoragePoolRefresh", "virStoragePoolRefresh", [], :int).and_return(true) storage_pool.stub(:send).with("virStoragePoolRefresh", []) end after :each do storage_pool.dispatcher('Refresh', [:int]) end it "should attach it as a binding for C's function" do storage_pool.should_receive(:attach_function).with("virStoragePoolRefresh", "virStoragePoolRefresh", [], :int).and_return(true) end it "should call the new attached method" do storage_pool.should_receive(:send).with("virStoragePoolRefresh", []) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
libvirt-ruby-0.0.1 | spec/libvirt-ruby/storage_pool_spec.rb |