shindo 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
data/lib/shindo.rb CHANGED
@@ -5,7 +5,7 @@ require 'gestalt'
5
5
  module Shindo
6
6
 
7
7
  unless const_defined?(:VERSION)
8
- VERSION = '0.1.6'
8
+ VERSION = '0.1.7'
9
9
  end
10
10
 
11
11
  def self.tests(description = nil, tags = [], &block)
@@ -46,6 +46,13 @@ module Shindo
46
46
  @befores.last.push(block)
47
47
  end
48
48
 
49
+ def pending
50
+ catch(:pending) do
51
+ @pending = true
52
+ end
53
+ throw(:pending)
54
+ end
55
+
49
56
  def tests(description, tags = [], &block)
50
57
  return self if Thread.main[:exit] || Thread.current[:reload]
51
58
 
@@ -123,7 +130,10 @@ module Shindo
123
130
  success = false
124
131
  value = error
125
132
  end
126
- if success
133
+ if @pending
134
+ display_pending(description)
135
+ @pending = false
136
+ elsif success
127
137
  display_success(description)
128
138
  else
129
139
  display_failure(description)
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.1.6'
17
- s.date = '2010-06-16'
16
+ s.version = '0.1.7'
17
+ s.date = '2010-10-13'
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,7 +14,8 @@ Shindo.tests('bin') do
14
14
 
15
15
  tests('pending') do
16
16
  @output = bin(path('pending'))
17
- includes('# pending') { @output }
17
+ includes('# implicit pending') { @output }
18
+ includes('# explicit pending') { @output }
18
19
  tests('$?.exitstatus').returns(0) { $?.exitstatus }
19
20
  end
20
21
 
data/tests/data/pending CHANGED
@@ -1,3 +1,4 @@
1
1
  Shindo.tests do
2
- test('pending')
2
+ test('implicit pending')
3
+ test('explicit pending') { pending }
3
4
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 6
9
- version: 0.1.6
8
+ - 7
9
+ version: 0.1.7
10
10
  platform: ruby
11
11
  authors:
12
12
  - geemus (Wesley Beary)
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-06-16 00:00:00 -07:00
17
+ date: 2010-10-13 00:00:00 -07:00
18
18
  default_executable: shindo
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency