Sha256: 9dee8f67d1128e90ad9f77cc5e4fcf930e6aac0743e185ed75474b794dc02083
Contents?: true
Size: 1 KB
Versions: 2
Compression:
Stored size: 1 KB
Contents
# encoding: CP1251 require 'spec_helper' describe P2::Application, "singleton app object" do after(:all) { P2::Application.reset CLIENT_INI } subject { P2::Application.instance CLIENT_INI } it 'wraps P2ClientGate.P2Application OLE class' do subject.ole_type.name.should == 'IP2Application' show_ole end its(:clsid) { should == '{08A95064-05C2-4EF4-8B5D-D6211C2C9880}' } its(:progid) { should == 'P2ClientGate.P2Application.1' } its(:opts) { should have_key :ini } its(:ini) { should == CLIENT_INI } its(:ole) { should be_a WIN32OLE } its(:ParserType) { should == 2 } # � 1 � Plaza; � 2 � Plaza-II (default) it 'is a Singleton' do a1 = P2::Application.instance a2 = P2::Application.instance a1.object_id.should == a2.object_id end context '.reset' do it 'resets Application singleton' do a1 = P2::Application.instance P2::Application.reset CLIENT_INI1 a2 = P2::Application.instance a1.object_id.should_not == a2.object_id end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
p2ruby-0.1.5 | spec/p2ruby/application_spec.rb |
p2ruby-0.1.4 | spec/p2ruby/application_spec.rb |