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