shindo 0.2.2 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- shindo (0.2.0)
4
+ shindo (0.2.2)
5
5
  formatador (>= 0.0.16)
6
6
 
7
7
  GEM
@@ -13,5 +13,4 @@ PLATFORMS
13
13
  ruby
14
14
 
15
15
  DEPENDENCIES
16
- formatador (>= 0.0.16)
17
16
  shindo!
@@ -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.2.2'
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
- catch(:pending) do
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
@@ -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.2.2'
17
- s.date = '2011-01-28'
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
@@ -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
 
@@ -1,4 +1,5 @@
1
1
  Shindo.tests do
2
- test('implicit pending')
3
- test('explicit pending') { pending }
2
+ test('test implicit pending')
3
+ test('test explicit pending') { pending }
4
+ tests('tests explicit pending') { pending }
4
5
  end
metadata CHANGED
@@ -2,12 +2,12 @@
2
2
  name: shindo
3
3
  version: !ruby/object:Gem::Version
4
4
  hash: 19
5
- prerelease: false
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
- - 2
9
- - 2
10
- version: 0.2.2
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-01-28 00:00:00 -08:00
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.3.7
99
+ rubygems_version: 1.4.1
100
100
  signing_key:
101
101
  specification_version: 2
102
102
  summary: Simple depth first Ruby testing.