summaryrefslogtreecommitdiff
path: root/spec/rubyspec/library/win32ole/win32ole/connect_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/rubyspec/library/win32ole/win32ole/connect_spec.rb')
-rw-r--r--spec/rubyspec/library/win32ole/win32ole/connect_spec.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/rubyspec/library/win32ole/win32ole/connect_spec.rb b/spec/rubyspec/library/win32ole/win32ole/connect_spec.rb
new file mode 100644
index 0000000000..ee480a727c
--- /dev/null
+++ b/spec/rubyspec/library/win32ole/win32ole/connect_spec.rb
@@ -0,0 +1,17 @@
+require File.expand_path('../../fixtures/classes', __FILE__)
+
+platform_is :windows do
+ require 'win32ole'
+
+ describe "WIN32OLE.connect" do
+ it "creates WIN32OLE object given valid argument" do
+ obj = WIN32OLE.connect("winmgmts:")
+ obj.should be_kind_of WIN32OLE
+ end
+
+ it "raises TypeError when given invalid argument" do
+ lambda { WIN32OLE.connect 1 }.should raise_error TypeError
+ end
+
+ end
+end