diff options
author | Benoit Daloze <[email protected]> | 2019-07-27 12:40:09 +0200 |
---|---|---|
committer | Benoit Daloze <[email protected]> | 2019-07-27 12:40:09 +0200 |
commit | 5c276e1cc91c5ab2a41fbf7827af2fed914a2bc0 (patch) | |
tree | 05b5c68c8b2a00224d4646ea3b26ce3877efaadd /spec/ruby/library/win32ole | |
parent | a06301b103371b0b7da8eaca26ba744961769f99 (diff) |
Update to ruby/spec@875a09e
Diffstat (limited to 'spec/ruby/library/win32ole')
40 files changed, 54 insertions, 54 deletions
diff --git a/spec/ruby/library/win32ole/win32ole/_invoke_spec.rb b/spec/ruby/library/win32ole/win32ole/_invoke_spec.rb index 9809f89e7c..91f5091d24 100644 --- a/spec/ruby/library/win32ole/win32ole/_invoke_spec.rb +++ b/spec/ruby/library/win32ole/win32ole/_invoke_spec.rb @@ -7,9 +7,9 @@ platform_is :windows do end it "raises ArgumentError if insufficient number of arguments are given" do - lambda { @shell._invoke() }.should raise_error ArgumentError - lambda { @shell._invoke(0) }.should raise_error ArgumentError - lambda { @shell._invoke(0, []) }.should raise_error ArgumentError + -> { @shell._invoke() }.should raise_error ArgumentError + -> { @shell._invoke(0) }.should raise_error ArgumentError + -> { @shell._invoke(0, []) }.should raise_error ArgumentError end it "dispatches the method bound to a specific ID" do diff --git a/spec/ruby/library/win32ole/win32ole/connect_spec.rb b/spec/ruby/library/win32ole/win32ole/connect_spec.rb index 590ef7688c..72dceb1572 100644 --- a/spec/ruby/library/win32ole/win32ole/connect_spec.rb +++ b/spec/ruby/library/win32ole/win32ole/connect_spec.rb @@ -8,7 +8,7 @@ platform_is :windows do end it "raises TypeError when given invalid argument" do - lambda { WIN32OLE.connect 1 }.should raise_error TypeError + -> { WIN32OLE.connect 1 }.should raise_error TypeError end end diff --git a/spec/ruby/library/win32ole/win32ole/locale_spec.rb b/spec/ruby/library/win32ole/win32ole/locale_spec.rb index a0376ce123..75a82ddd7f 100644 --- a/spec/ruby/library/win32ole/win32ole/locale_spec.rb +++ b/spec/ruby/library/win32ole/win32ole/locale_spec.rb @@ -19,7 +19,7 @@ platform_is :windows do WIN32OLE.locale.should == 1041 WIN32OLE.locale = WIN32OLE::LOCALE_SYSTEM_DEFAULT - lambda { WIN32OLE.locale = 111 }.should raise_error WIN32OLERuntimeError + -> { WIN32OLE.locale = 111 }.should raise_error WIN32OLERuntimeError WIN32OLE.locale.should == WIN32OLE::LOCALE_SYSTEM_DEFAULT ensure WIN32OLE.locale.should == WIN32OLE::LOCALE_SYSTEM_DEFAULT diff --git a/spec/ruby/library/win32ole/win32ole/new_spec.rb b/spec/ruby/library/win32ole/win32ole/new_spec.rb index d1c3e02593..6b717195f1 100644 --- a/spec/ruby/library/win32ole/win32ole/new_spec.rb +++ b/spec/ruby/library/win32ole/win32ole/new_spec.rb @@ -13,11 +13,11 @@ platform_is :windows do end it "raises TypeError if argument cannot be converted to String" do - lambda { WIN32OLESpecs.new_ole(42) }.should raise_error( TypeError ) + -> { WIN32OLESpecs.new_ole(42) }.should raise_error( TypeError ) end it "raises WIN32OLERuntimeError if invalid string is given" do - lambda { WIN32OLE.new('foo') }.should raise_error( WIN32OLERuntimeError ) + -> { WIN32OLE.new('foo') }.should raise_error( WIN32OLERuntimeError ) end end 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 5488c4fd29..75748182fe 100644 --- a/spec/ruby/library/win32ole/win32ole/ole_func_methods_spec.rb +++ b/spec/ruby/library/win32ole/win32ole/ole_func_methods_spec.rb @@ -7,7 +7,7 @@ platform_is :windows do end it "raises ArgumentError if argument is given" do - lambda { @dict.ole_func_methods(1) }.should raise_error ArgumentError + -> { @dict.ole_func_methods(1) }.should raise_error ArgumentError end it "returns an array of WIN32OLE_METHODs" do diff --git a/spec/ruby/library/win32ole/win32ole/ole_methods_spec.rb b/spec/ruby/library/win32ole/win32ole/ole_methods_spec.rb index b2baac265e..5ac9ae9cfa 100644 --- a/spec/ruby/library/win32ole/win32ole/ole_methods_spec.rb +++ b/spec/ruby/library/win32ole/win32ole/ole_methods_spec.rb @@ -7,7 +7,7 @@ platform_is :windows do end it "raises ArgumentError if argument is given" do - lambda { @dict.ole_methods(1) }.should raise_error ArgumentError + -> { @dict.ole_methods(1) }.should raise_error ArgumentError end it "returns an array of WIN32OLE_METHODs" do diff --git a/spec/ruby/library/win32ole/win32ole/ole_obj_help_spec.rb b/spec/ruby/library/win32ole/win32ole/ole_obj_help_spec.rb index 2d31aac9eb..ef8944ee39 100644 --- a/spec/ruby/library/win32ole/win32ole/ole_obj_help_spec.rb +++ b/spec/ruby/library/win32ole/win32ole/ole_obj_help_spec.rb @@ -8,7 +8,7 @@ platform_is :windows do end it "raises ArgumentError if argument is given" do - lambda { @dict.ole_obj_help(1) }.should raise_error ArgumentError + -> { @dict.ole_obj_help(1) }.should raise_error ArgumentError end it "returns an instance of WIN32OLE_TYPE" do diff --git a/spec/ruby/library/win32ole/win32ole/ole_put_methods_spec.rb b/spec/ruby/library/win32ole/win32ole/ole_put_methods_spec.rb index 45af41c6c2..727291e9f0 100644 --- a/spec/ruby/library/win32ole/win32ole/ole_put_methods_spec.rb +++ b/spec/ruby/library/win32ole/win32ole/ole_put_methods_spec.rb @@ -7,7 +7,7 @@ platform_is :windows do end it "raises ArgumentError if argument is given" do - lambda { @dict.ole_put_methods(1) }.should raise_error ArgumentError + -> { @dict.ole_put_methods(1) }.should raise_error ArgumentError end it "returns an array of WIN32OLE_METHODs" do diff --git a/spec/ruby/library/win32ole/win32ole/shared/ole_method.rb b/spec/ruby/library/win32ole/win32ole/shared/ole_method.rb index 26566a0b14..f1fd8713a4 100644 --- a/spec/ruby/library/win32ole/win32ole/shared/ole_method.rb +++ b/spec/ruby/library/win32ole/win32ole/shared/ole_method.rb @@ -7,7 +7,7 @@ platform_is :windows do end it "raises ArgumentError if no argument is given" do - lambda { @dict.send(@method) }.should raise_error ArgumentError + -> { @dict.send(@method) }.should raise_error ArgumentError end it "returns the WIN32OLE_METHOD 'Add' if given 'Add'" do diff --git a/spec/ruby/library/win32ole/win32ole/shared/setproperty.rb b/spec/ruby/library/win32ole/win32ole/shared/setproperty.rb index b850d21933..b9267aef71 100644 --- a/spec/ruby/library/win32ole/win32ole/shared/setproperty.rb +++ b/spec/ruby/library/win32ole/win32ole/shared/setproperty.rb @@ -7,7 +7,7 @@ platform_is :windows do end it "raises ArgumentError if no argument is given" do - lambda { @dict.send(@method) }.should raise_error ArgumentError + -> { @dict.send(@method) }.should raise_error ArgumentError end it "sets key to newkey and returns nil" do diff --git a/spec/ruby/library/win32ole/win32ole_event/new_spec.rb b/spec/ruby/library/win32ole/win32ole_event/new_spec.rb index 4ce11a716b..a1a1612393 100644 --- a/spec/ruby/library/win32ole/win32ole_event/new_spec.rb +++ b/spec/ruby/library/win32ole/win32ole_event/new_spec.rb @@ -12,16 +12,16 @@ platform_is :windows do end it "raises TypeError given invalid argument" do - lambda { WIN32OLE_EVENT.new "A" }.should raise_error TypeError + -> { WIN32OLE_EVENT.new "A" }.should raise_error TypeError end it "raises RuntimeError if event does not exist" do - lambda { WIN32OLE_EVENT.new(@xml_dom, 'A') }.should raise_error RuntimeError + -> { WIN32OLE_EVENT.new(@xml_dom, 'A') }.should raise_error RuntimeError end it "raises RuntimeError if OLE object has no events" do dict = WIN32OLESpecs.new_ole('Scripting.Dictionary') - lambda { WIN32OLE_EVENT.new(dict) }.should raise_error RuntimeError + -> { WIN32OLE_EVENT.new(dict) }.should raise_error RuntimeError end it "creates WIN32OLE_EVENT object" do diff --git a/spec/ruby/library/win32ole/win32ole_method/dispid_spec.rb b/spec/ruby/library/win32ole/win32ole_method/dispid_spec.rb index 840cdf72b8..69068683b7 100644 --- a/spec/ruby/library/win32ole/win32ole_method/dispid_spec.rb +++ b/spec/ruby/library/win32ole/win32ole_method/dispid_spec.rb @@ -8,7 +8,7 @@ platform_is :windows do end it "raises ArgumentError if argument is given" do - lambda { @m.dispid(0) }.should raise_error ArgumentError + -> { @m.dispid(0) }.should raise_error ArgumentError end it "returns expected dispatch ID for Shell's 'namespace' method" do diff --git a/spec/ruby/library/win32ole/win32ole_method/event_interface_spec.rb b/spec/ruby/library/win32ole/win32ole_method/event_interface_spec.rb index 1b88d80ff9..70c8b30cca 100644 --- a/spec/ruby/library/win32ole/win32ole_method/event_interface_spec.rb +++ b/spec/ruby/library/win32ole/win32ole_method/event_interface_spec.rb @@ -11,7 +11,7 @@ platform_is :windows do end it "raises ArgumentError if argument is given" do - lambda { @on_dbl_click_method.event_interface(1) }.should raise_error ArgumentError + -> { @on_dbl_click_method.event_interface(1) }.should raise_error ArgumentError end it "returns expected string for System Monitor Control's 'OnDblClick' method" do diff --git a/spec/ruby/library/win32ole/win32ole_method/event_spec.rb b/spec/ruby/library/win32ole/win32ole_method/event_spec.rb index 81628805d0..c41f8fe99d 100644 --- a/spec/ruby/library/win32ole/win32ole_method/event_spec.rb +++ b/spec/ruby/library/win32ole/win32ole_method/event_spec.rb @@ -9,7 +9,7 @@ platform_is :windows do end it "raises ArgumentError if argument is given" do - lambda { @on_dbl_click_method.event?(1) }.should raise_error ArgumentError + -> { @on_dbl_click_method.event?(1) }.should raise_error ArgumentError end it "returns true for System Monitor Control's 'OnDblClick' method" do diff --git a/spec/ruby/library/win32ole/win32ole_method/helpcontext_spec.rb b/spec/ruby/library/win32ole/win32ole_method/helpcontext_spec.rb index a0008fa7d5..21b3ae8bde 100644 --- a/spec/ruby/library/win32ole/win32ole_method/helpcontext_spec.rb +++ b/spec/ruby/library/win32ole/win32ole_method/helpcontext_spec.rb @@ -10,7 +10,7 @@ platform_is :windows do end it "raises ArgumentError if argument is given" do - lambda { @get_file_version.helpcontext(1) }.should raise_error ArgumentError + -> { @get_file_version.helpcontext(1) }.should raise_error ArgumentError end it "returns expected value for FileSystemObject's 'GetFileVersion' method" do diff --git a/spec/ruby/library/win32ole/win32ole_method/helpfile_spec.rb b/spec/ruby/library/win32ole/win32ole_method/helpfile_spec.rb index 72cc4da16b..b6d0a19a37 100644 --- a/spec/ruby/library/win32ole/win32ole_method/helpfile_spec.rb +++ b/spec/ruby/library/win32ole/win32ole_method/helpfile_spec.rb @@ -8,7 +8,7 @@ platform_is :windows do end it "raises ArgumentError if argument is given" do - lambda { @m_file_name.helpfile(1) }.should raise_error ArgumentError + -> { @m_file_name.helpfile(1) }.should raise_error ArgumentError end it "returns expected value for Scripting Runtime's 'File' method" do diff --git a/spec/ruby/library/win32ole/win32ole_method/helpstring_spec.rb b/spec/ruby/library/win32ole/win32ole_method/helpstring_spec.rb index 60105d0aa2..9f940fd4a0 100644 --- a/spec/ruby/library/win32ole/win32ole_method/helpstring_spec.rb +++ b/spec/ruby/library/win32ole/win32ole_method/helpstring_spec.rb @@ -8,7 +8,7 @@ platform_is :windows do end it "raises ArgumentError if argument is given" do - lambda { @m_file_name.helpstring(1) }.should raise_error ArgumentError + -> { @m_file_name.helpstring(1) }.should raise_error ArgumentError end it "returns expected value for Scripting Runtime's 'File' method" do diff --git a/spec/ruby/library/win32ole/win32ole_method/invkind_spec.rb b/spec/ruby/library/win32ole/win32ole_method/invkind_spec.rb index cf0a74bbce..7fff479daf 100644 --- a/spec/ruby/library/win32ole/win32ole_method/invkind_spec.rb +++ b/spec/ruby/library/win32ole/win32ole_method/invkind_spec.rb @@ -8,7 +8,7 @@ platform_is :windows do end it "raises ArgumentError if argument is given" do - lambda { @m_file_name.invkind(1) }.should raise_error ArgumentError + -> { @m_file_name.invkind(1) }.should raise_error ArgumentError end it "returns expected value for Scripting Runtime's 'name' method" do diff --git a/spec/ruby/library/win32ole/win32ole_method/invoke_kind_spec.rb b/spec/ruby/library/win32ole/win32ole_method/invoke_kind_spec.rb index 4d2af8fb0c..e8638abd91 100644 --- a/spec/ruby/library/win32ole/win32ole_method/invoke_kind_spec.rb +++ b/spec/ruby/library/win32ole/win32ole_method/invoke_kind_spec.rb @@ -8,7 +8,7 @@ platform_is :windows do end it "raises ArgumentError if argument is given" do - lambda { @m_file_name.invoke_kind(1) }.should raise_error ArgumentError + -> { @m_file_name.invoke_kind(1) }.should raise_error ArgumentError end it "returns expected value for Scripting Runtime's 'name' method" do diff --git a/spec/ruby/library/win32ole/win32ole_method/new_spec.rb b/spec/ruby/library/win32ole/win32ole_method/new_spec.rb index f904107c6c..8ebf93b992 100644 --- a/spec/ruby/library/win32ole/win32ole_method/new_spec.rb +++ b/spec/ruby/library/win32ole/win32ole_method/new_spec.rb @@ -7,12 +7,12 @@ platform_is :windows do end it "raises TypeError when given non-strings" do - lambda { WIN32OLE_METHOD.new(1, 2) }.should raise_error TypeError + -> { WIN32OLE_METHOD.new(1, 2) }.should raise_error TypeError end it "raises ArgumentError if only 1 argument is given" do - lambda { WIN32OLE_METHOD.new("hello") }.should raise_error ArgumentError - lambda { WIN32OLE_METHOD.new(@ole_type) }.should raise_error ArgumentError + -> { WIN32OLE_METHOD.new("hello") }.should raise_error ArgumentError + -> { WIN32OLE_METHOD.new(@ole_type) }.should raise_error ArgumentError end it "returns a valid WIN32OLE_METHOD object" do @@ -21,11 +21,11 @@ platform_is :windows do end it "raises WIN32OLERuntimeError if the method does not exist" do - lambda { WIN32OLE_METHOD.new(@ole_type, "NonexistentMethod") }.should raise_error WIN32OLERuntimeError + -> { WIN32OLE_METHOD.new(@ole_type, "NonexistentMethod") }.should raise_error WIN32OLERuntimeError end it "raises TypeError if second argument is not a String" do - lambda { WIN32OLE_METHOD.new(@ole_type, 5) }.should raise_error TypeError + -> { WIN32OLE_METHOD.new(@ole_type, 5) }.should raise_error TypeError end end diff --git a/spec/ruby/library/win32ole/win32ole_method/offset_vtbl_spec.rb b/spec/ruby/library/win32ole/win32ole_method/offset_vtbl_spec.rb index f94e48c051..8e50c39787 100644 --- a/spec/ruby/library/win32ole/win32ole_method/offset_vtbl_spec.rb +++ b/spec/ruby/library/win32ole/win32ole_method/offset_vtbl_spec.rb @@ -8,7 +8,7 @@ platform_is :windows do end it "raises ArgumentError if argument is given" do - lambda { @m_file_name.offset_vtbl(1) }.should raise_error ArgumentError + -> { @m_file_name.offset_vtbl(1) }.should raise_error ArgumentError end it "returns expected value for Scripting Runtime's 'name' method" do diff --git a/spec/ruby/library/win32ole/win32ole_method/params_spec.rb b/spec/ruby/library/win32ole/win32ole_method/params_spec.rb index 08c7f04bdd..2f8da3d45b 100644 --- a/spec/ruby/library/win32ole/win32ole_method/params_spec.rb +++ b/spec/ruby/library/win32ole/win32ole_method/params_spec.rb @@ -10,7 +10,7 @@ platform_is :windows do end it "raises ArgumentError if argument is given" do - lambda { @m_file_name.params(1) }.should raise_error ArgumentError + -> { @m_file_name.params(1) }.should raise_error ArgumentError end it "returns empty array for Scripting Runtime's 'name' method" do diff --git a/spec/ruby/library/win32ole/win32ole_method/return_type_detail_spec.rb b/spec/ruby/library/win32ole/win32ole_method/return_type_detail_spec.rb index b8f2bbe084..f8ce3e1b3a 100644 --- a/spec/ruby/library/win32ole/win32ole_method/return_type_detail_spec.rb +++ b/spec/ruby/library/win32ole/win32ole_method/return_type_detail_spec.rb @@ -8,7 +8,7 @@ platform_is :windows do end it "raises ArgumentError if argument is given" do - lambda { @m_browse_for_folder.return_type_detail(1) }.should raise_error ArgumentError + -> { @m_browse_for_folder.return_type_detail(1) }.should raise_error ArgumentError end it "returns expected value for Shell Control's 'BrowseForFolder' method" do diff --git a/spec/ruby/library/win32ole/win32ole_method/return_type_spec.rb b/spec/ruby/library/win32ole/win32ole_method/return_type_spec.rb index b68481fe59..58e26df77b 100644 --- a/spec/ruby/library/win32ole/win32ole_method/return_type_spec.rb +++ b/spec/ruby/library/win32ole/win32ole_method/return_type_spec.rb @@ -8,7 +8,7 @@ platform_is :windows do end it "raises ArgumentError if argument is given" do - lambda { @m_file_name.return_type(1) }.should raise_error ArgumentError + -> { @m_file_name.return_type(1) }.should raise_error ArgumentError end it "returns expected value for Scripting Runtime's 'name' method" do diff --git a/spec/ruby/library/win32ole/win32ole_method/return_vtype_spec.rb b/spec/ruby/library/win32ole/win32ole_method/return_vtype_spec.rb index f236de01f9..dc159dd09e 100644 --- a/spec/ruby/library/win32ole/win32ole_method/return_vtype_spec.rb +++ b/spec/ruby/library/win32ole/win32ole_method/return_vtype_spec.rb @@ -8,7 +8,7 @@ platform_is :windows do end it "raises ArgumentError if argument is given" do - lambda { @m_browse_for_folder.return_vtype(1) }.should raise_error ArgumentError + -> { @m_browse_for_folder.return_vtype(1) }.should raise_error ArgumentError end it "returns expected value for Shell Control's 'BrowseForFolder' method" do diff --git a/spec/ruby/library/win32ole/win32ole_method/shared/name.rb b/spec/ruby/library/win32ole/win32ole_method/shared/name.rb index 2be6478a6e..ddaff4011b 100644 --- a/spec/ruby/library/win32ole/win32ole_method/shared/name.rb +++ b/spec/ruby/library/win32ole/win32ole_method/shared/name.rb @@ -8,7 +8,7 @@ platform_is :windows do end it "raises ArgumentError if argument is given" do - lambda { @m_file_name.send(@method, 1) }.should raise_error ArgumentError + -> { @m_file_name.send(@method, 1) }.should raise_error ArgumentError end it "returns expected value for Scripting Runtime's 'name' method" do diff --git a/spec/ruby/library/win32ole/win32ole_method/size_opt_params_spec.rb b/spec/ruby/library/win32ole/win32ole_method/size_opt_params_spec.rb index a63c50474c..a38fe5c681 100644 --- a/spec/ruby/library/win32ole/win32ole_method/size_opt_params_spec.rb +++ b/spec/ruby/library/win32ole/win32ole_method/size_opt_params_spec.rb @@ -8,7 +8,7 @@ platform_is :windows do end it "raises ArgumentError if argument is given" do - lambda { @m_browse_for_folder.size_opt_params(1) }.should raise_error ArgumentError + -> { @m_browse_for_folder.size_opt_params(1) }.should raise_error ArgumentError end it "returns expected value for Shell Control's 'BrowseForFolder' method" do diff --git a/spec/ruby/library/win32ole/win32ole_method/size_params_spec.rb b/spec/ruby/library/win32ole/win32ole_method/size_params_spec.rb index fe93d5bc66..0c5a94c338 100644 --- a/spec/ruby/library/win32ole/win32ole_method/size_params_spec.rb +++ b/spec/ruby/library/win32ole/win32ole_method/size_params_spec.rb @@ -8,7 +8,7 @@ platform_is :windows do end it "raises ArgumentError if argument is given" do - lambda { @m_browse_for_folder.size_params(1) }.should raise_error ArgumentError + -> { @m_browse_for_folder.size_params(1) }.should raise_error ArgumentError end it "returns expected value for Shell Control's 'BrowseForFolder' method" do diff --git a/spec/ruby/library/win32ole/win32ole_method/visible_spec.rb b/spec/ruby/library/win32ole/win32ole_method/visible_spec.rb index b49fac6066..918b6ef782 100644 --- a/spec/ruby/library/win32ole/win32ole_method/visible_spec.rb +++ b/spec/ruby/library/win32ole/win32ole_method/visible_spec.rb @@ -8,7 +8,7 @@ platform_is :windows do end it "raises ArgumentError if argument is given" do - lambda { @m_browse_for_folder.visible?(1) }.should raise_error ArgumentError + -> { @m_browse_for_folder.visible?(1) }.should raise_error ArgumentError end it "returns true for Shell Control's 'BrowseForFolder' method" do diff --git a/spec/ruby/library/win32ole/win32ole_param/default_spec.rb b/spec/ruby/library/win32ole/win32ole_param/default_spec.rb index 7a1337ec7c..af08c84782 100644 --- a/spec/ruby/library/win32ole/win32ole_param/default_spec.rb +++ b/spec/ruby/library/win32ole/win32ole_param/default_spec.rb @@ -13,7 +13,7 @@ platform_is :windows do end it "raises ArgumentError if argument is given" do - lambda { @params[0].default(1) }.should raise_error ArgumentError + -> { @params[0].default(1) }.should raise_error ArgumentError end it "returns nil for each of WIN32OLE_PARAM for Shell's 'BrowseForFolder' method" do diff --git a/spec/ruby/library/win32ole/win32ole_param/input_spec.rb b/spec/ruby/library/win32ole/win32ole_param/input_spec.rb index bdf4bccc79..a0022fef13 100644 --- a/spec/ruby/library/win32ole/win32ole_param/input_spec.rb +++ b/spec/ruby/library/win32ole/win32ole_param/input_spec.rb @@ -9,7 +9,7 @@ platform_is :windows do end it "raises ArgumentError if argument is given" do - lambda { @param_overwritefiles.input?(1) }.should raise_error ArgumentError + -> { @param_overwritefiles.input?(1) }.should raise_error ArgumentError end it "returns true for 3rd parameter of FileSystemObject's 'CopyFile' method" do diff --git a/spec/ruby/library/win32ole/win32ole_param/ole_type_detail_spec.rb b/spec/ruby/library/win32ole/win32ole_param/ole_type_detail_spec.rb index 3ba51c02f1..e683d1c16e 100644 --- a/spec/ruby/library/win32ole/win32ole_param/ole_type_detail_spec.rb +++ b/spec/ruby/library/win32ole/win32ole_param/ole_type_detail_spec.rb @@ -9,7 +9,7 @@ platform_is :windows do end it "raises ArgumentError if argument is given" do - lambda { @param_overwritefiles.ole_type_detail(1) }.should raise_error ArgumentError + -> { @param_overwritefiles.ole_type_detail(1) }.should raise_error ArgumentError end it "returns ['BOOL'] for 3rd parameter of FileSystemObject's 'CopyFile' method" do diff --git a/spec/ruby/library/win32ole/win32ole_param/ole_type_spec.rb b/spec/ruby/library/win32ole/win32ole_param/ole_type_spec.rb index 52bee2c9b8..b9a3639c3e 100644 --- a/spec/ruby/library/win32ole/win32ole_param/ole_type_spec.rb +++ b/spec/ruby/library/win32ole/win32ole_param/ole_type_spec.rb @@ -9,7 +9,7 @@ platform_is :windows do end it "raises ArgumentError if argument is given" do - lambda { @param_overwritefiles.ole_type(1) }.should raise_error ArgumentError + -> { @param_overwritefiles.ole_type(1) }.should raise_error ArgumentError end it "returns 'BOOL' for 3rd parameter of FileSystemObject's 'CopyFile' method" do diff --git a/spec/ruby/library/win32ole/win32ole_param/optional_spec.rb b/spec/ruby/library/win32ole/win32ole_param/optional_spec.rb index 2476df8641..3fb9dc1867 100644 --- a/spec/ruby/library/win32ole/win32ole_param/optional_spec.rb +++ b/spec/ruby/library/win32ole/win32ole_param/optional_spec.rb @@ -9,7 +9,7 @@ platform_is :windows do end it "raises ArgumentError if argument is given" do - lambda { @param_overwritefiles.optional?(1) }.should raise_error ArgumentError + -> { @param_overwritefiles.optional?(1) }.should raise_error ArgumentError end it "returns true for 3rd parameter of FileSystemObject's 'CopyFile' method" do diff --git a/spec/ruby/library/win32ole/win32ole_param/retval_spec.rb b/spec/ruby/library/win32ole/win32ole_param/retval_spec.rb index 90946c0774..f5546e79e5 100644 --- a/spec/ruby/library/win32ole/win32ole_param/retval_spec.rb +++ b/spec/ruby/library/win32ole/win32ole_param/retval_spec.rb @@ -9,7 +9,7 @@ platform_is :windows do end it "raises ArgumentError if argument is given" do - lambda { @param_overwritefiles.retval?(1) }.should raise_error ArgumentError + -> { @param_overwritefiles.retval?(1) }.should raise_error ArgumentError end it "returns false for 3rd parameter of FileSystemObject's 'CopyFile' method" do diff --git a/spec/ruby/library/win32ole/win32ole_param/shared/name.rb b/spec/ruby/library/win32ole/win32ole_param/shared/name.rb index b7892d92fb..043bc32856 100644 --- a/spec/ruby/library/win32ole/win32ole_param/shared/name.rb +++ b/spec/ruby/library/win32ole/win32ole_param/shared/name.rb @@ -9,7 +9,7 @@ platform_is :windows do end it "raises ArgumentError if argument is given" do - lambda { @param_overwritefiles.send(@method, 1) }.should raise_error ArgumentError + -> { @param_overwritefiles.send(@method, 1) }.should raise_error ArgumentError end it "returns expected value for Scripting Runtime's 'name' method" do diff --git a/spec/ruby/library/win32ole/win32ole_type/new_spec.rb b/spec/ruby/library/win32ole/win32ole_type/new_spec.rb index 9443a64c75..fab690c2dd 100644 --- a/spec/ruby/library/win32ole/win32ole_type/new_spec.rb +++ b/spec/ruby/library/win32ole/win32ole_type/new_spec.rb @@ -3,23 +3,23 @@ platform_is :windows do describe "WIN32OLE_TYPE.new" do it "raises ArgumentError with no argument" do - lambda { WIN32OLE_TYPE.new }.should raise_error ArgumentError + -> { WIN32OLE_TYPE.new }.should raise_error ArgumentError end it "raises ArgumentError with invalid string" do - lambda { WIN32OLE_TYPE.new("foo") }.should raise_error ArgumentError + -> { WIN32OLE_TYPE.new("foo") }.should raise_error ArgumentError end it "raises TypeError if second argument is not a String" do - lambda { WIN32OLE_TYPE.new(1,2) }.should raise_error TypeError - lambda { WIN32OLE_TYPE.new('Microsoft Shell Controls And Automation',2) }. + -> { WIN32OLE_TYPE.new(1,2) }.should raise_error TypeError + -> { WIN32OLE_TYPE.new('Microsoft Shell Controls And Automation',2) }. should raise_error TypeError end it "raise WIN32OLERuntimeError if OLE object specified is not found" do - lambda { WIN32OLE_TYPE.new('Microsoft Shell Controls And Automation','foo') }. + -> { WIN32OLE_TYPE.new('Microsoft Shell Controls And Automation','foo') }. should raise_error WIN32OLERuntimeError - lambda { WIN32OLE_TYPE.new('Microsoft Shell Controls And Automation','Application') }. + -> { WIN32OLE_TYPE.new('Microsoft Shell Controls And Automation','Application') }. should raise_error WIN32OLERuntimeError end diff --git a/spec/ruby/library/win32ole/win32ole_type/progids_spec.rb b/spec/ruby/library/win32ole/win32ole_type/progids_spec.rb index 0cdd3514e3..19d8bf56e0 100644 --- a/spec/ruby/library/win32ole/win32ole_type/progids_spec.rb +++ b/spec/ruby/library/win32ole/win32ole_type/progids_spec.rb @@ -3,7 +3,7 @@ platform_is :windows do describe "WIN32OLE_TYPE.progids" do it "raises ArgumentError if an argument is given" do - lambda { WIN32OLE_TYPE.progids(1) }.should raise_error ArgumentError + -> { WIN32OLE_TYPE.progids(1) }.should raise_error ArgumentError end it "returns an array containing 'Shell.Explorer'" do diff --git a/spec/ruby/library/win32ole/win32ole_type/shared/name.rb b/spec/ruby/library/win32ole/win32ole_type/shared/name.rb index 6484ef0ef8..6f37446b23 100644 --- a/spec/ruby/library/win32ole/win32ole_type/shared/name.rb +++ b/spec/ruby/library/win32ole/win32ole_type/shared/name.rb @@ -7,7 +7,7 @@ platform_is :windows do end it "raises ArgumentError if argument is given" do - lambda { @ole_type.send(@method, 1) }.should raise_error ArgumentError + -> { @ole_type.send(@method, 1) }.should raise_error ArgumentError end it "returns a String" do diff --git a/spec/ruby/library/win32ole/win32ole_type/typelibs_spec.rb b/spec/ruby/library/win32ole/win32ole_type/typelibs_spec.rb index 3a28c0496c..369e0274f3 100644 --- a/spec/ruby/library/win32ole/win32ole_type/typelibs_spec.rb +++ b/spec/ruby/library/win32ole/win32ole_type/typelibs_spec.rb @@ -11,7 +11,7 @@ platform_is :windows do end it "raises ArgumentError if any argument is give" do - lambda { WIN32OLE_TYPE.typelibs(1) }.should raise_error ArgumentError + -> { WIN32OLE_TYPE.typelibs(1) }.should raise_error ArgumentError end it "returns array of type libraries" do |