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