summaryrefslogtreecommitdiff
path: root/spec/ruby/library/win32ole/win32ole/connect_spec.rb
blob: ac0976ddc12a7d4c305cf42dc1afd97fa1d333d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require_relative "../../../spec_helper"
platform_is :windows do
  require_relative '../fixtures/classes'

  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
      -> { WIN32OLE.connect 1 }.should raise_error TypeError
    end

  end
end