choosy 0.2.4 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/VERSION +1 -1
- data/lib/choosy/command.rb +1 -0
- data/spec/choosy/command_spec.rb +17 -2
- metadata +2 -2
data/lib/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.5
|
data/lib/choosy/command.rb
CHANGED
data/spec/choosy/command_spec.rb
CHANGED
@@ -32,9 +32,24 @@ module Choosy
|
|
32
32
|
end
|
33
33
|
|
34
34
|
o = capture :stdout do
|
35
|
-
|
35
|
+
attempting {
|
36
36
|
@c.parse!(['--help'])
|
37
|
-
|
37
|
+
}.should raise_error(SystemExit)
|
38
|
+
end
|
39
|
+
|
40
|
+
o.should match(/-h, --help/)
|
41
|
+
end
|
42
|
+
|
43
|
+
it "should make sure that help gets check before other required options" do
|
44
|
+
@c.alter do
|
45
|
+
help
|
46
|
+
string :str, "String", :required => true
|
47
|
+
end
|
48
|
+
|
49
|
+
o = capture do
|
50
|
+
attempting {
|
51
|
+
@c.parse! ['--help']
|
52
|
+
}.should raise_error(SystemExit)
|
38
53
|
end
|
39
54
|
|
40
55
|
o.should match(/-h, --help/)
|