summaryrefslogtreecommitdiff
path: root/test/option_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/option_test.rb')
-rw-r--r--test/option_test.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/option_test.rb b/test/option_test.rb
index 0daaa0c..c888073 100644
--- a/test/option_test.rb
+++ b/test/option_test.rb
@@ -52,7 +52,10 @@ class OptionTest < TestCase
end
test "integer type cast" do
- assert_equal 1, option_value(%w'-f 1', :f=, :as => Integer)
+ opts = Slop.new
+ opts.on :f=, :as => Integer
+ opts.parse %w'-f 1'
+ assert_equal 1, opts[:f]
end
test "symbol type cast" do