diff options
Diffstat (limited to 'spec/ruby/library')
13 files changed, 14 insertions, 45 deletions
diff --git a/spec/ruby/library/win32ole/fixtures/classes.rb b/spec/ruby/library/win32ole/fixtures/classes.rb index 407af553c2..139aa1225c 100644 --- a/spec/ruby/library/win32ole/fixtures/classes.rb +++ b/spec/ruby/library/win32ole/fixtures/classes.rb @@ -1,14 +1,7 @@ -begin - require 'win32ole' -rescue LoadError -end +require 'win32ole' module WIN32OLESpecs - begin - MSXML_AVAILABLE = !!WIN32OLE_TYPELIB.typelibs.find { |t| t.name.start_with?('Microsoft XML') } - rescue - MSXML_AVAILABLE = false - end + MSXML_AVAILABLE = !!WIN32OLE_TYPELIB.typelibs.find { |t| t.name.start_with?('Microsoft XML') } def self.new_ole(name) tries = 0 diff --git a/spec/ruby/library/win32ole/win32ole/_getproperty_spec.rb b/spec/ruby/library/win32ole/win32ole/_getproperty_spec.rb index b7bd8044c4..940eebfb91 100644 --- a/spec/ruby/library/win32ole/win32ole/_getproperty_spec.rb +++ b/spec/ruby/library/win32ole/win32ole/_getproperty_spec.rb @@ -1,7 +1,5 @@ -require_relative '../fixtures/classes' - platform_is :windows do - require 'win32ole' + require_relative '../fixtures/classes' describe "WIN32OLE#_getproperty" do before :each do diff --git a/spec/ruby/library/win32ole/win32ole/_invoke_spec.rb b/spec/ruby/library/win32ole/win32ole/_invoke_spec.rb index b38a55021b..9809f89e7c 100644 --- a/spec/ruby/library/win32ole/win32ole/_invoke_spec.rb +++ b/spec/ruby/library/win32ole/win32ole/_invoke_spec.rb @@ -1,7 +1,5 @@ -require_relative '../fixtures/classes' - platform_is :windows do - require 'win32ole' + require_relative '../fixtures/classes' describe "WIN32OLE#_invoke" do before :each do diff --git a/spec/ruby/library/win32ole/win32ole/codepage_spec.rb b/spec/ruby/library/win32ole/win32ole/codepage_spec.rb index 58c183e82c..4e0cf5ca55 100644 --- a/spec/ruby/library/win32ole/win32ole/codepage_spec.rb +++ b/spec/ruby/library/win32ole/win32ole/codepage_spec.rb @@ -1,7 +1,5 @@ -require_relative '../fixtures/classes' - platform_is :windows do - require 'win32ole' + require_relative '../fixtures/classes' describe "WIN32OLE.codepage=" do it "sets codepage" do diff --git a/spec/ruby/library/win32ole/win32ole/connect_spec.rb b/spec/ruby/library/win32ole/win32ole/connect_spec.rb index f9293e3c99..590ef7688c 100644 --- a/spec/ruby/library/win32ole/win32ole/connect_spec.rb +++ b/spec/ruby/library/win32ole/win32ole/connect_spec.rb @@ -1,7 +1,5 @@ -require_relative '../fixtures/classes' - platform_is :windows do - require 'win32ole' + require_relative '../fixtures/classes' describe "WIN32OLE.connect" do it "creates WIN32OLE object given valid argument" do diff --git a/spec/ruby/library/win32ole/win32ole/const_load_spec.rb b/spec/ruby/library/win32ole/win32ole/const_load_spec.rb index ed0216ce71..cacc7a2b22 100644 --- a/spec/ruby/library/win32ole/win32ole/const_load_spec.rb +++ b/spec/ruby/library/win32ole/win32ole/const_load_spec.rb @@ -1,7 +1,5 @@ -require_relative '../fixtures/classes' - platform_is :windows do - require 'win32ole' + require_relative '../fixtures/classes' describe "WIN32OLE.const_load when passed Shell.Application OLE object" do before :each do diff --git a/spec/ruby/library/win32ole/win32ole/constants_spec.rb b/spec/ruby/library/win32ole/win32ole/constants_spec.rb index 05d0ef99a5..978b7ade92 100644 --- a/spec/ruby/library/win32ole/win32ole/constants_spec.rb +++ b/spec/ruby/library/win32ole/win32ole/constants_spec.rb @@ -1,7 +1,5 @@ -require_relative '../fixtures/classes' - platform_is :windows do - require 'win32ole' + require_relative '../fixtures/classes' describe "WIN32OLE class" do it "defines constant CP_ACP" do diff --git a/spec/ruby/library/win32ole/win32ole/create_guid_spec.rb b/spec/ruby/library/win32ole/win32ole/create_guid_spec.rb index 3121b7ebd4..2e18b6ab11 100644 --- a/spec/ruby/library/win32ole/win32ole/create_guid_spec.rb +++ b/spec/ruby/library/win32ole/win32ole/create_guid_spec.rb @@ -1,7 +1,5 @@ -require_relative '../fixtures/classes' - platform_is :windows do - require 'win32ole' + require_relative '../fixtures/classes' describe "WIN32OLE.create_guid" do it "generates guid with valid format" do diff --git a/spec/ruby/library/win32ole/win32ole/invoke_spec.rb b/spec/ruby/library/win32ole/win32ole/invoke_spec.rb index a8fa6c7e79..08a5156e05 100644 --- a/spec/ruby/library/win32ole/win32ole/invoke_spec.rb +++ b/spec/ruby/library/win32ole/win32ole/invoke_spec.rb @@ -1,7 +1,5 @@ -require_relative '../fixtures/classes' - platform_is :windows do - require 'win32ole' + require_relative '../fixtures/classes' describe "WIN32OLE#invoke" do before :each do diff --git a/spec/ruby/library/win32ole/win32ole/locale_spec.rb b/spec/ruby/library/win32ole/win32ole/locale_spec.rb index 9b9005a37f..a0376ce123 100644 --- a/spec/ruby/library/win32ole/win32ole/locale_spec.rb +++ b/spec/ruby/library/win32ole/win32ole/locale_spec.rb @@ -1,7 +1,5 @@ -require_relative '../fixtures/classes' - platform_is :windows do - require 'win32ole' + require_relative '../fixtures/classes' describe "WIN32OLE.locale" do it "gets locale" do diff --git a/spec/ruby/library/win32ole/win32ole/new_spec.rb b/spec/ruby/library/win32ole/win32ole/new_spec.rb index ebc8a34993..cb45488288 100644 --- a/spec/ruby/library/win32ole/win32ole/new_spec.rb +++ b/spec/ruby/library/win32ole/win32ole/new_spec.rb @@ -1,7 +1,5 @@ -require_relative '../fixtures/classes' - platform_is :windows do - require 'win32ole' + require_relative '../fixtures/classes' describe "WIN32OLESpecs.new_ole" do it "creates a WIN32OLE object from OLE server name" do diff --git a/spec/ruby/library/win32ole/win32ole/ole_func_methods_spec.rb b/spec/ruby/library/win32ole/win32ole/ole_func_methods_spec.rb index 5779e40241..5488c4fd29 100644 --- a/spec/ruby/library/win32ole/win32ole/ole_func_methods_spec.rb +++ b/spec/ruby/library/win32ole/win32ole/ole_func_methods_spec.rb @@ -1,7 +1,5 @@ -require_relative '../fixtures/classes' - platform_is :windows do - require 'win32ole' + require_relative '../fixtures/classes' describe "WIN32OLE#ole_func_methods" do before :each do diff --git a/spec/ruby/library/win32ole/win32ole/ole_get_methods_spec.rb b/spec/ruby/library/win32ole/win32ole/ole_get_methods_spec.rb index 52c5df7fc6..a991624a23 100644 --- a/spec/ruby/library/win32ole/win32ole/ole_get_methods_spec.rb +++ b/spec/ruby/library/win32ole/win32ole/ole_get_methods_spec.rb @@ -1,7 +1,5 @@ -require_relative '../fixtures/classes' - platform_is :windows do - require 'win32ole' + require_relative '../fixtures/classes' describe "WIN32OLE#ole_get_methods" do |