[前][次][番号順一覧][スレッド一覧]

ruby-changes:53184

From: suke <ko1@a...>
Date: Sun, 28 Oct 2018 08:38:03 +0900 (JST)
Subject: [ruby-changes:53184] suke:r65399 (trunk): use Scripting.Dictionary instead of InternetExplorer.Application.

suke	2018-10-28 08:37:58 +0900 (Sun, 28 Oct 2018)

  New Revision: 65399

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=65399

  Log:
    use Scripting.Dictionary instead of InternetExplorer.Application.
    
    * spec/ruby/library/win32ole/invoke_spec.rb: use Scripting.Dictionary
      instead of InternetExplorer.Application. InternetExplorer.Application
      is not available on some environment. Thanks to MSP-Greg (Greg L).

  Modified files:
    trunk/spec/ruby/library/win32ole/win32ole/invoke_spec.rb
Index: spec/ruby/library/win32ole/win32ole/invoke_spec.rb
===================================================================
--- spec/ruby/library/win32ole/win32ole/invoke_spec.rb	(revision 65398)
+++ spec/ruby/library/win32ole/win32ole/invoke_spec.rb	(revision 65399)
@@ -5,15 +5,12 @@ platform_is :windows do https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/win32ole/win32ole/invoke_spec.rb#L5
 
   describe "WIN32OLE#invoke" do
     before :each do
-      @ie = WIN32OLESpecs.new_ole('InternetExplorer.Application')
+      @dict = WIN32OLESpecs.new_ole('Scripting.Dictionary')
     end
 
-    after :each do
-      @ie.Quit
-    end
-
-    it "get name by invoking 'Name' OLE method" do
-      @ie.invoke('Name').should =~ /explorer/i
+    it "get value by invoking 'Item' OLE method" do
+      @dict.add('key', 'value')
+      @dict.invoke('Item', 'key').should == 'value'
     end
   end
 end

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]