summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/option_test.rb4
-rw-r--r--test/options_test.rb4
-rw-r--r--test/types_test.rb2
3 files changed, 5 insertions, 5 deletions
diff --git a/test/option_test.rb b/test/option_test.rb
index a8db657..4c23401 100644
--- a/test/option_test.rb
+++ b/test/option_test.rb
@@ -1,8 +1,8 @@
require 'test_helper'
describe Slop::Option do
- def option(*args)
- Slop::Option.new(*args)
+ def option(*args, **kwargs, &block)
+ Slop::Option.new(*args, **kwargs, &block)
end
describe "#flag" do
diff --git a/test/options_test.rb b/test/options_test.rb
index f816b74..2f83fc4 100644
--- a/test/options_test.rb
+++ b/test/options_test.rb
@@ -121,11 +121,11 @@ describe Slop::Options do
describe "custom banner" do
it "is prefixed with defined banner" do
- @options_config = Slop::Options.new({banner: "custom banner"})
+ @options_config = Slop::Options.new(**{banner: "custom banner"})
assert_match(/^custom banner/, @options_config.to_s)
end
it "banner is disabled" do
- @options_config = Slop::Options.new({banner: false})
+ @options_config = Slop::Options.new(**{banner: false})
assert_match("", @options_config.to_s)
end
end
diff --git a/test/types_test.rb b/test/types_test.rb
index f6b928e..ff1363c 100644
--- a/test/types_test.rb
+++ b/test/types_test.rb
@@ -39,7 +39,7 @@ describe Slop::IntegerOption do
it "returns the value as an integer" do
assert_equal 20, @result[:age]
- assert_equal -10, @result[:minus]
+ assert_equal (-10), @result[:minus]
assert_equal 30, @result[:plus]
end