Skip to content

Commit 3b72bc7

Browse files
committed
Suppress WIN32OLE deprecation warnings for the time being
1 parent ce849d5 commit 3b72bc7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+299
-0
lines changed

spec/ruby/library/win32ole/fixtures/classes.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
require 'win32ole'
22

33
module WIN32OLESpecs
4+
WIN32OLERuntimeError ||= WIN32OLE::RuntimeError
5+
WIN32OLE_TYPELIB ||= WIN32OLE::TypeLib
6+
47
MSXML_AVAILABLE = WIN32OLE_TYPELIB.typelibs.any? { |t| t.name.start_with?('Microsoft XML') }
58
SYSTEM_MONITOR_CONTROL_AVAILABLE = WIN32OLE_TYPELIB.typelibs.any? { |t| t.name.start_with?('System Monitor Control') }
69

spec/ruby/library/win32ole/win32ole/_getproperty_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
require_relative "../../../spec_helper"
22
platform_is :windows do
3+
verbose, $VERBOSE = $VERBOSE, nil
4+
35
require_relative '../fixtures/classes'
46

57
describe "WIN32OLE#_getproperty" do
@@ -12,4 +14,6 @@
1214
@dict._getproperty(0, ['key'], [WIN32OLE::VARIANT::VT_BSTR]).should == 'value'
1315
end
1416
end
17+
ensure
18+
$VERBOSE = verbose
1519
end

spec/ruby/library/win32ole/win32ole/_invoke_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
require_relative "../../../spec_helper"
22
platform_is :windows do
3+
verbose, $VERBOSE = $VERBOSE, nil
4+
35
require_relative '../fixtures/classes'
46

57
describe "WIN32OLE#_invoke" do
@@ -19,4 +21,6 @@
1921

2022
end
2123

24+
ensure
25+
$VERBOSE = verbose
2226
end

spec/ruby/library/win32ole/win32ole/codepage_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
require_relative "../../../spec_helper"
22
platform_is :windows do
3+
verbose, $VERBOSE = $VERBOSE, nil
4+
35
require_relative '../fixtures/classes'
46

57
describe "WIN32OLE.codepage=" do
@@ -11,4 +13,6 @@
1113
end
1214
end
1315

16+
ensure
17+
$VERBOSE = verbose
1418
end

spec/ruby/library/win32ole/win32ole/connect_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
require_relative "../../../spec_helper"
22
platform_is :windows do
3+
verbose, $VERBOSE = $VERBOSE, nil
4+
35
require_relative '../fixtures/classes'
46

57
describe "WIN32OLE.connect" do
@@ -13,4 +15,6 @@
1315
end
1416

1517
end
18+
ensure
19+
$VERBOSE = verbose
1620
end

spec/ruby/library/win32ole/win32ole/const_load_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
require_relative "../../../spec_helper"
22
platform_is :windows do
3+
verbose, $VERBOSE = $VERBOSE, nil
4+
35
require_relative '../fixtures/classes'
46

57
describe "WIN32OLE.const_load when passed Shell.Application OLE object" do
@@ -30,4 +32,6 @@ module WIN32OLE_RUBYSPEC; end
3032
end
3133
end
3234

35+
ensure
36+
$VERBOSE = verbose
3337
end

spec/ruby/library/win32ole/win32ole/constants_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
require_relative "../../../spec_helper"
22
platform_is :windows do
3+
verbose, $VERBOSE = $VERBOSE, nil
4+
35
require_relative '../fixtures/classes'
46

57
describe "WIN32OLE class" do
@@ -40,4 +42,6 @@
4042
end
4143
end
4244

45+
ensure
46+
$VERBOSE = verbose
4347
end
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
require_relative "../../../spec_helper"
22
platform_is :windows do
3+
verbose, $VERBOSE = $VERBOSE, nil
4+
35
require_relative '../fixtures/classes'
46

57
describe "WIN32OLE.create_guid" do
68
it "generates guid with valid format" do
79
WIN32OLE.create_guid.should =~ /^\{[A-Z0-9]{8}\-[A-Z0-9]{4}\-[A-Z0-9]{4}\-[A-Z0-9]{4}\-[A-Z0-9]{12}/
810
end
911
end
12+
ensure
13+
$VERBOSE = verbose
1014
end

spec/ruby/library/win32ole/win32ole/invoke_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
require_relative "../../../spec_helper"
22
platform_is :windows do
3+
verbose, $VERBOSE = $VERBOSE, nil
4+
35
require_relative '../fixtures/classes'
46

57
describe "WIN32OLE#invoke" do
@@ -12,4 +14,6 @@
1214
@dict.invoke('Item', 'key').should == 'value'
1315
end
1416
end
17+
ensure
18+
$VERBOSE = verbose
1519
end

spec/ruby/library/win32ole/win32ole/locale_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
require_relative "../../../spec_helper"
22
platform_is :windows do
3+
verbose, $VERBOSE = $VERBOSE, nil
4+
35
require_relative '../fixtures/classes'
46

57
describe "WIN32OLE.locale" do
@@ -27,4 +29,6 @@
2729
end
2830
end
2931
end
32+
ensure
33+
$VERBOSE = verbose
3034
end

0 commit comments

Comments
 (0)