shindo 0.2.2 → 0.3.0
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/Gemfile.lock +1 -2
- data/lib/shindo.rb +9 -8
- data/shindo.gemspec +2 -2
- data/tests/bin_tests.rb +3 -2
- data/tests/data/pending +3 -2
- metadata +6 -6
data/Gemfile.lock
CHANGED
data/lib/shindo.rb
CHANGED
@@ -3,8 +3,10 @@ require 'formatador'
|
|
3
3
|
|
4
4
|
module Shindo
|
5
5
|
|
6
|
+
class Pending < StandardError; end
|
7
|
+
|
6
8
|
unless const_defined?(:VERSION)
|
7
|
-
VERSION = '0.
|
9
|
+
VERSION = '0.3.0'
|
8
10
|
end
|
9
11
|
|
10
12
|
def self.tests(description = nil, tags = [], &block)
|
@@ -45,10 +47,7 @@ module Shindo
|
|
45
47
|
end
|
46
48
|
|
47
49
|
def pending
|
48
|
-
|
49
|
-
@pending = true
|
50
|
-
end
|
51
|
-
throw(:pending)
|
50
|
+
raise(Shindo::Pending.new)
|
52
51
|
end
|
53
52
|
|
54
53
|
def tests(description, tags = [], &block)
|
@@ -74,11 +73,11 @@ module Shindo
|
|
74
73
|
begin
|
75
74
|
display_description(description)
|
76
75
|
Formatador.indent { instance_eval(&block) }
|
76
|
+
rescue Shindo::Pending
|
77
|
+
display_pending(description)
|
77
78
|
rescue => error
|
78
79
|
display_error(error)
|
79
80
|
end
|
80
|
-
else
|
81
|
-
@description = description
|
82
81
|
end
|
83
82
|
else
|
84
83
|
display_description("[light_black]#{description}[/]")
|
@@ -129,13 +128,15 @@ module Shindo
|
|
129
128
|
for after in @afters.flatten.compact
|
130
129
|
after.call
|
131
130
|
end
|
131
|
+
rescue Shindo::Pending
|
132
|
+
@pending = true
|
132
133
|
rescue => error
|
133
134
|
success = false
|
134
135
|
value = error
|
135
136
|
end
|
136
137
|
if @pending
|
137
|
-
display_pending(description)
|
138
138
|
@pending = false
|
139
|
+
display_pending(description)
|
139
140
|
elsif success
|
140
141
|
display_success(description)
|
141
142
|
else
|
data/shindo.gemspec
CHANGED
@@ -13,8 +13,8 @@ Gem::Specification.new do |s|
|
|
13
13
|
## If your rubyforge_project name is different, then edit it and comment out
|
14
14
|
## the sub! line in the Rakefile
|
15
15
|
s.name = 'shindo'
|
16
|
-
s.version = '0.
|
17
|
-
s.date = '2011-
|
16
|
+
s.version = '0.3.0'
|
17
|
+
s.date = '2011-03-10'
|
18
18
|
s.rubyforge_project = 'shindo'
|
19
19
|
|
20
20
|
## Make sure your summary is short. The description may be as long
|
data/tests/bin_tests.rb
CHANGED
@@ -14,8 +14,9 @@ Shindo.tests('bin') do
|
|
14
14
|
|
15
15
|
tests('pending') do
|
16
16
|
@output = bin(path('pending'))
|
17
|
-
includes('# implicit pending') { @output }
|
18
|
-
includes('# explicit pending') { @output }
|
17
|
+
includes('# test implicit pending') { @output }
|
18
|
+
includes('# test explicit pending') { @output }
|
19
|
+
includes('# tests explicit pending') { @output }
|
19
20
|
tests('$?.exitstatus').returns(0) { $?.exitstatus }
|
20
21
|
end
|
21
22
|
|
data/tests/data/pending
CHANGED
metadata
CHANGED
@@ -2,12 +2,12 @@
|
|
2
2
|
name: shindo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
hash: 19
|
5
|
-
prerelease:
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 3
|
9
|
+
- 0
|
10
|
+
version: 0.3.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- geemus (Wesley Beary)
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-03-10 00:00:00 -08:00
|
19
19
|
default_executable: shindo
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -96,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
96
96
|
requirements: []
|
97
97
|
|
98
98
|
rubyforge_project: shindo
|
99
|
-
rubygems_version: 1.
|
99
|
+
rubygems_version: 1.4.1
|
100
100
|
signing_key:
|
101
101
|
specification_version: 2
|
102
102
|
summary: Simple depth first Ruby testing.
|