clive 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -58,6 +58,7 @@ class Clive
58
58
  else
59
59
  puts @base.help
60
60
  end
61
+ Kernel.exit 0
61
62
  end
62
63
 
63
64
  until ended?
@@ -1,3 +1,3 @@
1
1
  class Clive
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
@@ -28,6 +28,8 @@ describe Clive::Formatter::Colour do
28
28
 
29
29
  subject { Clive::Formatter::Colour }
30
30
 
31
+ before { Kernel.stubs(:exit) }
32
+
31
33
  describe '#to_s' do
32
34
 
33
35
  it 'builds the help string' do
@@ -28,6 +28,8 @@ describe Clive::Formatter::Plain do
28
28
 
29
29
  subject { Clive::Formatter::Plain }
30
30
 
31
+ before { Kernel.stubs(:exit) }
32
+
31
33
  describe '#to_s' do
32
34
 
33
35
  it 'builds the help string' do
@@ -8,6 +8,7 @@ describe Clive::Parser do
8
8
 
9
9
  describe 'with no argument' do
10
10
  it 'prints the help' do
11
+ Kernel.expects(:exit)
11
12
  this {
12
13
  subject.run s 'help'
13
14
  }.must_output <<EOS
@@ -25,6 +26,7 @@ EOS
25
26
 
26
27
  describe 'with an argument' do
27
28
  it 'prints help for that command' do
29
+ Kernel.expects(:exit)
28
30
  this {
29
31
  subject.run s 'help new'
30
32
  }.must_output <<EOS
@@ -37,6 +39,7 @@ EOS
37
39
  end
38
40
 
39
41
  it 'prints an error if command does not exist' do
42
+ Kernel.expects(:exit)
40
43
  this {
41
44
  subject.run s 'help missing'
42
45
  }.must_output "Error: command missing could not be found. Try `help` to see the available commands.\n"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clive
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-30 00:00:00.000000000 Z
12
+ date: 2012-02-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: minitest
16
- requirement: &2157118780 !ruby/object:Gem::Requirement
16
+ requirement: &2156107440 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '2.6'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *2157118780
24
+ version_requirements: *2156107440
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: mocha
27
- requirement: &2157118180 !ruby/object:Gem::Requirement
27
+ requirement: &2156106140 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '0.10'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *2157118180
35
+ version_requirements: *2156106140
36
36
  description: ! " Clive provides a DSL for building command line interfaces. It
37
37
  allows \n you to define commands and options, which can also take arguments,
38
38
  \n and then runs the correct stuff!\n"