require fixtures/classes only when platform is windows.

* spec/ruby/library/win32ole/fixtures/classes.rb: remove rescue block
  because this file is required when platform is Windows.
* spec/ruby/library/win32ole/win32ole/_getproperty_spec.rb:
  fixtures/classes is required when platform is Windows
* spec/ruby/library/win32ole/win32ole/_invoke_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/codepage_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/connect_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/const_load_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/constants_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/create_guid_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/invoke_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/locale_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/new_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/ole_func_methods_spec.rb: ditto.
* spec/ruby/library/win32ole/win32ole/ole_get_methods_spec.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
suke 2018-10-28 06:37:33 +00:00
Родитель c5491046ee
Коммит 5918f0a086
13 изменённых файлов: 14 добавлений и 45 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -1,7 +1,5 @@
require_relative '../fixtures/classes'
platform_is :windows do
require 'win32ole'
require_relative '../fixtures/classes'
describe "WIN32OLE#ole_get_methods" do