shindo 0.0.8 → 0.0.9

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.8
1
+ 0.0.9
data/lib/shindo.rb CHANGED
@@ -42,14 +42,8 @@ module Shindo
42
42
  @befores[-1].push(block)
43
43
  end
44
44
 
45
- def tags
46
- unless @tag_stack.flatten.empty?
47
- " [#{@tag_stack.flatten.join(', ')}]"
48
- end
49
- end
50
-
51
45
  def prompt(description, &block)
52
- @formatador.display("#{@formatador.indentation}Action? [c,i,q,r,t,#,?]? ")
46
+ @formatador.display("Action? [c,i,q,r,t,#,?]? ")
53
47
  choice = STDIN.gets.strip
54
48
  @formatador.display_line("")
55
49
  case choice
@@ -139,7 +133,12 @@ module Shindo
139
133
  @befores.push([])
140
134
  @afters.push([])
141
135
 
142
- @formatador.display_line(description || 'Shindo.tests')
136
+ taggings = ''
137
+ unless tags.empty?
138
+ taggings = " (#{[*tags].join(', ')})"
139
+ end
140
+
141
+ @formatador.display_line((description || 'Shindo.tests') << taggings)
143
142
  if block_given?
144
143
  @formatador.indent { instance_eval(&block) }
145
144
  end
@@ -151,6 +150,10 @@ module Shindo
151
150
 
152
151
  def test(description, tags = [], &block)
153
152
  @tag_stack.push([*tags])
153
+ taggings = ''
154
+ unless tags.empty?
155
+ taggings = " (#{[*tags].join(', ')})"
156
+ end
154
157
 
155
158
  # if the test includes +tags and discludes -tags, evaluate it
156
159
  if (@if_tagged.empty? || !(@if_tagged & @tag_stack.flatten).empty?) &&
@@ -178,9 +181,9 @@ module Shindo
178
181
  end
179
182
  @success = @success && success
180
183
  if success
181
- @formatador.display_line("[green]+ #{description}#{tags}[/]")
184
+ @formatador.display_line("[green]+ #{description}#{taggings}[/]")
182
185
  else
183
- @formatador.display_line("[red]- #{description}#{tags}[/]")
186
+ @formatador.display_line("[red]- #{description}#{taggings}[/]")
184
187
  if STDOUT.tty?
185
188
  prompt(description, &block)
186
189
  end
@@ -190,10 +193,10 @@ module Shindo
190
193
  after.call
191
194
  end
192
195
  else
193
- @formatador.display_line("[yellow]* #{description}[/]")
196
+ @formatador.display_line("[yellow]* #{description}#{taggings}[/]")
194
197
  end
195
198
  else
196
- @formatador.display_line("_ #{description}")
199
+ @formatador.display_line("_ #{description}#{taggings}")
197
200
  end
198
201
 
199
202
  @tag_stack.pop
data/shindo.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{shindo}
8
- s.version = "0.0.8"
8
+ s.version = "0.0.9"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["geemus (Wesley Beary)"]
12
- s.date = %q{2009-12-01}
12
+ s.date = %q{2009-12-03}
13
13
  s.default_executable = %q{shindo}
14
14
  s.description = %q{Simple depth first ruby testing}
15
15
  s.email = %q{me@geemus.com}
data/tests/tag_tests.rb CHANGED
@@ -23,13 +23,13 @@ Shindo.tests('tags') do
23
23
  tests('negative') do
24
24
  before { @output = `#{BIN} #{negative.path} -negative` }
25
25
  test('is tested') { @output.include?('+ is tested') }
26
- test('is skipped') { @output.include?('_ is skipped [negative]') }
26
+ test('is skipped') { @output.include?('_ is skipped (negative)') }
27
27
  test('status') { $?.exitstatus == 0 }
28
28
  end
29
29
 
30
30
  tests('positive') do
31
31
  before { @output = `#{BIN} #{positive.path} +positive` }
32
- test('is tested') { @output.include?('+ is tested [positive]') }
32
+ test('is tested') { @output.include?('+ is tested (positive)') }
33
33
  test('is skipped') { @output.include?('_ is skipped') }
34
34
  test('status') { $?.exitstatus == 0 }
35
35
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shindo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - geemus (Wesley Beary)
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-01 00:00:00 -08:00
12
+ date: 2009-12-03 00:00:00 -08:00
13
13
  default_executable: shindo
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency