summaryrefslogtreecommitdiff
path: root/spec/ruby/library/win32ole/win32ole/shared/ole_method.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/win32ole/win32ole/shared/ole_method.rb')
-rw-r--r--spec/ruby/library/win32ole/win32ole/shared/ole_method.rb18
1 files changed, 6 insertions, 12 deletions
diff --git a/spec/ruby/library/win32ole/win32ole/shared/ole_method.rb b/spec/ruby/library/win32ole/win32ole/shared/ole_method.rb
index 33268e0aa2..26566a0b14 100644
--- a/spec/ruby/library/win32ole/win32ole/shared/ole_method.rb
+++ b/spec/ruby/library/win32ole/win32ole/shared/ole_method.rb
@@ -1,25 +1,19 @@
-require_relative '../../fixtures/classes'
-
platform_is :windows do
- require 'win32ole'
+ require_relative '../../fixtures/classes'
describe :win32ole_ole_method, shared: true do
before :each do
- @ie = WIN32OLESpecs.new_ole('InternetExplorer.Application')
- end
-
- after :each do
- @ie.Quit
+ @dict = WIN32OLESpecs.new_ole('Scripting.Dictionary')
end
it "raises ArgumentError if no argument is given" do
- lambda { @ie.send(@method) }.should raise_error ArgumentError
+ lambda { @dict.send(@method) }.should raise_error ArgumentError
end
- it "returns the WIN32OLE_METHOD 'Quit' if given 'Quit'" do
- result = @ie.send(@method, "Quit")
+ it "returns the WIN32OLE_METHOD 'Add' if given 'Add'" do
+ result = @dict.send(@method, "Add")
result.kind_of?(WIN32OLE_METHOD).should be_true
- result.name.should == 'Quit'
+ result.name.should == 'Add'
end
end
end