diff options
author | Lee Jarvis <ljjarvis@gmail.com> | 2014-11-19 13:23:12 +0000 |
---|---|---|
committer | Lee Jarvis <ljjarvis@gmail.com> | 2014-11-19 13:23:12 +0000 |
commit | ff8ad326fed2099c412dc7a31cefdf52f2221b66 (patch) | |
tree | aa3966935b8da80f8832e6f07daaa0e07a4cb014 /test/result_test.rb | |
parent | e3901588e3e767ffd6a08e32b535d15c5032351a (diff) | |
download | slop-ff8ad326fed2099c412dc7a31cefdf52f2221b66.tar.gz |
Support method_missing checks for used 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 cfa66d2..fb8ada2 100644 --- a/test/result_test.rb +++ b/test/result_test.rb @@ -47,6 +47,13 @@ describe Slop::Result do end end + describe "#method_missing" do + it "checks if options have been used" do + assert_equal true, @result.verbose? + assert_equal false, @result.unused? + end + end + describe "#option" do it "returns an option by flag" do assert_equal @verbose, @result.option("--verbose") |