summaryrefslogtreecommitdiff
path: root/test/option_test.rb
diff options
context:
space:
mode:
authorLee Jarvis <lee@jarvis.co>2012-01-27 01:52:55 +0000
committerLee Jarvis <lee@jarvis.co>2012-01-27 01:52:55 +0000
commit0c72dbb926183950810cf68cc7511f686667a410 (patch)
tree626eb3bda2de0708be9f439f6de8b79a0fa54ba6 /test/option_test.rb
parent5ca1435959590b8dc1fda8cb1ba9a57c58a7bab4 (diff)
downloadslop-0c72dbb926183950810cf68cc7511f686667a410.tar.gz
ensure tests run green on 1.8.7
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