Sha256: 8b098320293ac1d2ad17c41cd4b6f538558ed5b1f47c4cf921c04002f5483b36
Contents?: true
Size: 520 Bytes
Versions: 1
Compression:
Stored size: 520 Bytes
Contents
require File.expand_path 'test_helper', File.dirname(__FILE__) class TestArgsParserOn < MiniTest::Test def test_filter_error argv = ['--h', '--say', 'hello'] help_called = false say_called = false args = ArgsParser.parse argv do arg :help, 'show help', :alias => :h arg :say, 'string' on :say do |v| say_called = v end on :help do help_called = true end end assert_equal say_called, "hello" assert_equal help_called, true end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
args_parser-0.2.0 | test/test_on.rb |