diff options
Diffstat (limited to 'spec/rubyspec/library/win32ole/win32ole_type/shared/name.rb')
-rw-r--r-- | spec/rubyspec/library/win32ole/win32ole_type/shared/name.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/rubyspec/library/win32ole/win32ole_type/shared/name.rb b/spec/rubyspec/library/win32ole/win32ole_type/shared/name.rb new file mode 100644 index 0000000000..6484ef0ef8 --- /dev/null +++ b/spec/rubyspec/library/win32ole/win32ole_type/shared/name.rb @@ -0,0 +1,19 @@ +platform_is :windows do + require 'win32ole' + + describe :win32ole_type_name, shared: true do + before :each do + @ole_type = WIN32OLE_TYPE.new("Microsoft Shell Controls And Automation", "ShellSpecialFolderConstants") + end + + it "raises ArgumentError if argument is given" do + lambda { @ole_type.send(@method, 1) }.should raise_error ArgumentError + end + + it "returns a String" do + @ole_type.send(@method).should == 'ShellSpecialFolderConstants' + end + + end + +end |