summaryrefslogtreecommitdiff
path: root/spec/ruby/library/win32ole/win32ole_method/helpstring_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/win32ole/win32ole_method/helpstring_spec.rb')
-rw-r--r--spec/ruby/library/win32ole/win32ole_method/helpstring_spec.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/ruby/library/win32ole/win32ole_method/helpstring_spec.rb b/spec/ruby/library/win32ole/win32ole_method/helpstring_spec.rb
new file mode 100644
index 0000000000..2a93acdb37
--- /dev/null
+++ b/spec/ruby/library/win32ole/win32ole_method/helpstring_spec.rb
@@ -0,0 +1,21 @@
+require_relative "../../../spec_helper"
+platform_is :windows do
+ require 'win32ole'
+
+ describe "WIN32OLE::Method#helpstring" 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
+ -> { @m_file_name.helpstring(1) }.should.raise ArgumentError
+ end
+
+ it "returns expected value for Scripting Runtime's 'File' method" do
+ @m_file_name.helpstring.should == "Get name of file" # value indicated in MRI's test
+ end
+
+ end
+
+end