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