diff options
author | Teemu Matilainen <teemu.matilainen@iki.fi> | 2019-01-20 14:54:09 +0200 |
---|---|---|
committer | Teemu Matilainen <teemu.matilainen@iki.fi> | 2019-01-20 19:16:59 +0200 |
commit | 0c9175428655993b994d7fd5988002c437ab56a6 (patch) | |
tree | 27156f491f45ce58119837ba894b6041fcf9df85 /test | |
parent | 7037ef0867bf6da9149121b3efa3e80e6a70732c (diff) | |
download | slop-0c9175428655993b994d7fd5988002c437ab56a6.tar.gz |
Allow calling `Options#separator` without args, defaulting to an empty string
It's clear that we want an empty line when calling `opts.separator`
without arguments.
Leave the examples in the Readme still for a while with the empty string
to avoid confusion when using older versions.
Diffstat (limited to 'test')
-rw-r--r-- | test/options_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/options_test.rb b/test/options_test.rb index 3ef34c5..f816b74 100644 --- a/test/options_test.rb +++ b/test/options_test.rb @@ -64,6 +64,12 @@ describe Slop::Options do @options.separator("foo".freeze) @options.separator("bar".freeze) end + + it "defaults to empty string" do + @options.separator + + assert_equal [""], @options.separators + end end describe "#method_missing" do |