Sha256: 60a378c58df0fcf76ad8ad5f4aceed5af3dd3ca0cb4119f8743daecb33e3acb3
Contents?: true
Size: 782 Bytes
Versions: 7
Compression:
Stored size: 782 Bytes
Contents
require 'spec_helper' module Af::OptionParser describe GetOptions do it "returns object with GetOptions class" do GetOptions.new({ "--another-option" => { argument: 0 } }).should be_kind_of(GetOptions) end it "returns the correct @get_options value" do GetOptions.new({ "--another-option" => { argument: 0 } }). instance_variable_get("@getopt_options").should == [["--another-option", 0]] end it "returns passed options" do get_options = { "--another-option" => { argument: 0 }, "--foo" => { argument: 1, note: 'note' }, "--bar" => { argument: 1, short: '-b' } } GetOptions.new(get_options).instance_variable_get("@command_line_switchs").should == get_options end end end
Version data entries
7 entries across 7 versions & 1 rubygems