summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLee Jarvis <ljjarvis@gmail.com>2014-11-19 10:31:26 +0000
committerLee Jarvis <ljjarvis@gmail.com>2014-11-19 10:31:26 +0000
commit14458fb36b2bcc3ff10b837dc294e23c2cbefbb7 (patch)
tree84647f033bd3a7e09f855e73521703397a899967 /test
parent787efb1528b4ab8f7ff752f38d0df2d22dac1f03 (diff)
downloadslop-14458fb36b2bcc3ff10b837dc294e23c2cbefbb7.tar.gz
Store executed count on options
Diffstat (limited to 'test')
-rw-r--r--test/result_test.rb7
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"]