summaryrefslogtreecommitdiff
path: root/spec/ruby/library/win32ole/win32ole_method/size_opt_params_spec.rb
blob: a38fe5c6819acfb2076e4dfa2f9273ae601a47b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
platform_is :windows do
  require 'win32ole'

  describe "WIN32OLE_METHOD#size_opt_params" do
    before :each do
      ole_type = WIN32OLE_TYPE.new("Microsoft Shell Controls And Automation", "Shell")
      @m_browse_for_folder = WIN32OLE_METHOD.new(ole_type, "BrowseForFolder")
    end

    it "raises ArgumentError if argument is given" do
      -> { @m_browse_for_folder.size_opt_params(1) }.should raise_error ArgumentError
    end

    it "returns expected value for Shell Control's 'BrowseForFolder' method" do
      @m_browse_for_folder.size_opt_params.should == 1
    end

  end

end