diff options
author | Lee Jarvis <lee@jarvis.co> | 2011-04-23 23:00:35 +0100 |
---|---|---|
committer | Lee Jarvis <lee@jarvis.co> | 2011-04-23 23:00:35 +0100 |
commit | 7457688eb1551135cbabf0313a14dad6a299d003 (patch) | |
tree | cf5ae83c15f1764d76c94ed989e36f56cb11d84d /test/option_test.rb | |
parent | d83989611220eb6f8cb35511aef2e34f77b90085 (diff) | |
download | slop-7457688eb1551135cbabf0313a14dad6a299d003.tar.gz |
add test for abbreviated :sym
Diffstat (limited to 'test/option_test.rb')
-rw-r--r-- | test/option_test.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/option_test.rb b/test/option_test.rb index e9ea3c1..472b17b 100644 --- a/test/option_test.rb +++ b/test/option_test.rb @@ -63,6 +63,7 @@ class OptionTest < TestCase test 'casting' do assert_equal :foo, option_value(%w/--name foo/, :name, true, :as => Symbol) assert_equal :foo, option_value(%w/--name foo/, :name, true, :as => :symbol) + assert_equal :foo, option_value(%w/--name foo/, :name, true, :as => :sym) assert_equal 30, option_value(%w/--age 30/, :age, true, :as => Integer) assert_equal "1.0", option_value(%w/--id 1/, :id, true, :as => Float).to_s end |