diff options
author | Lee Jarvis <ljjarvis@gmail.com> | 2014-11-19 18:32:19 +0000 |
---|---|---|
committer | Lee Jarvis <ljjarvis@gmail.com> | 2014-11-19 18:32:19 +0000 |
commit | 7440c92117511ed050652254e0ba28257c0765d8 (patch) | |
tree | 868c200f7094ad2557ee75132716bf1915c5a42f /test | |
parent | 3ef0e0ea86dbaf58c6e975c52ea1772776f296e2 (diff) | |
download | slop-7440c92117511ed050652254e0ba28257c0765d8.tar.gz |
Ensure booleans default to false
Diffstat (limited to 'test')
-rw-r--r-- | test/types_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/types_test.rb b/test/types_test.rb index e814ff9..b359408 100644 --- a/test/types_test.rb +++ b/test/types_test.rb @@ -4,12 +4,17 @@ describe Slop::BoolOption do before do @options = Slop::Options.new @age = @options.bool "--verbose" + @age = @options.bool "--quiet" @result = @options.parse %w(--verbose) end it "returns true if used" do assert_equal true, @result[:verbose] end + + it "returns false if not used" do + assert_equal false, @result[:quiet] + end end describe Slop::IntegerOption do |