optionize 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/optionize.rb +4 -0
- data/spec/hash_spec.rb +11 -0
- data/spec/optionize_spec.rb +12 -0
- metadata +3 -2
data/Rakefile
CHANGED
data/lib/optionize.rb
CHANGED
data/spec/hash_spec.rb
ADDED
data/spec/optionize_spec.rb
CHANGED
@@ -99,4 +99,16 @@ describe Optionize do
|
|
99
99
|
its("age" ) { should == 16 }
|
100
100
|
end
|
101
101
|
|
102
|
+
######################################################################
|
103
|
+
### misc
|
104
|
+
|
105
|
+
describe "functional test" do
|
106
|
+
it "should work with 'default' option" do
|
107
|
+
# NOTE: to distinct with Hash#default
|
108
|
+
args = [:foo, []]
|
109
|
+
opts = Optionize.new(args, :name, :default)
|
110
|
+
opts.name.should == :foo
|
111
|
+
opts.default.should == []
|
112
|
+
end
|
113
|
+
end
|
102
114
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: optionize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- maiha
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-02-
|
12
|
+
date: 2010-02-02 00:00:00 +09:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -29,6 +29,7 @@ files:
|
|
29
29
|
- lib/optionize/array.rb
|
30
30
|
- lib/optionize.rb
|
31
31
|
- spec/optionize_spec.rb
|
32
|
+
- spec/hash_spec.rb
|
32
33
|
- spec/its_helper.rb
|
33
34
|
- spec/spec_helper.rb
|
34
35
|
- spec/syntax_spec.rb
|