diff options
3 files changed, 10 insertions, 20 deletions
diff --git a/spec/ruby/library/win32ole/win32ole/ole_method_help_spec.rb b/spec/ruby/library/win32ole/win32ole/ole_method_help_spec.rb index 3f2083225f..8a26d79a20 100644 --- a/spec/ruby/library/win32ole/win32ole/ole_method_help_spec.rb +++ b/spec/ruby/library/win32ole/win32ole/ole_method_help_spec.rb @@ -1,8 +1,6 @@ -require_relative '../fixtures/classes' -require_relative 'shared/ole_method' - platform_is :windows do - require 'win32ole' + require_relative '../fixtures/classes' + require_relative 'shared/ole_method' describe "WIN32OLE#ole_method_help" do it_behaves_like :win32ole_ole_method, :ole_method_help diff --git a/spec/ruby/library/win32ole/win32ole/ole_method_spec.rb b/spec/ruby/library/win32ole/win32ole/ole_method_spec.rb index 7b7be496c9..f82a212f5d 100644 --- a/spec/ruby/library/win32ole/win32ole/ole_method_spec.rb +++ b/spec/ruby/library/win32ole/win32ole/ole_method_spec.rb @@ -1,8 +1,6 @@ -require_relative '../fixtures/classes' -require_relative 'shared/ole_method' - platform_is :windows do - require 'win32ole' + require_relative '../fixtures/classes' + require_relative 'shared/ole_method' describe "WIN32OLE#ole_method" do it_behaves_like :win32ole_ole_method, :ole_method 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 |