diff options
author | Lee Jarvis <ljjarvis@gmail.com> | 2014-11-19 10:31:26 +0000 |
---|---|---|
committer | Lee Jarvis <ljjarvis@gmail.com> | 2014-11-19 10:31:26 +0000 |
commit | 14458fb36b2bcc3ff10b837dc294e23c2cbefbb7 (patch) | |
tree | 84647f033bd3a7e09f855e73521703397a899967 /test/result_test.rb | |
parent | 787efb1528b4ab8f7ff752f38d0df2d22dac1f03 (diff) | |
download | slop-14458fb36b2bcc3ff10b837dc294e23c2cbefbb7.tar.gz |
Store executed count on options
Diffstat (limited to 'test/result_test.rb')
-rw-r--r-- | test/result_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/result_test.rb b/test/result_test.rb index b9a1d75..d1406e1 100644 --- a/test/result_test.rb +++ b/test/result_test.rb @@ -9,6 +9,13 @@ describe Slop::Result do @result = @options.parse %w(foo -v --name lee argument) end + it "increments option count" do + # test this here so it's more "full stack" + assert_equal 1, @verbose.count + @result.parser.reset.parse %w(-v --verbose) + assert_equal 2, @verbose.count + end + describe "#[]" do it "returns an options value" do assert_equal "lee", @result["name"] |