aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/library/win32ole/win32ole/connect_spec.rb
blob: ee480a727c6efe33ea041ad416ffafc8b1b0dab9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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