aboutsummaryrefslogtreecommitdiffstats
path: root/spec/rubyspec/library/win32ole/win32ole_method/return_type_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/rubyspec/library/win32ole/win32ole_method/return_type_spec.rb')
-rw-r--r--spec/rubyspec/library/win32ole/win32ole_method/return_type_spec.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/rubyspec/library/win32ole/win32ole_method/return_type_spec.rb b/spec/rubyspec/library/win32ole/win32ole_method/return_type_spec.rb
new file mode 100644
index 0000000000..b68481fe59
--- /dev/null
+++ b/spec/rubyspec/library/win32ole/win32ole_method/return_type_spec.rb
@@ -0,0 +1,20 @@
+platform_is :windows do
+ require 'win32ole'
+
+ describe "WIN32OLE_METHOD#return_type" do
+ before :each do
+ ole_type = WIN32OLE_TYPE.new("Microsoft Scripting Runtime", "File")
+ @m_file_name = WIN32OLE_METHOD.new(ole_type, "name")
+ end
+
+ it "raises ArgumentError if argument is given" do
+ lambda { @m_file_name.return_type(1) }.should raise_error ArgumentError
+ end
+
+ it "returns expected value for Scripting Runtime's 'name' method" do
+ @m_file_name.return_type.should == 'BSTR'
+ end
+
+ end
+
+end