rspec_spinner 0.4.5 → 0.4.8

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/lib/rspec_spinner.rb CHANGED
@@ -6,7 +6,7 @@ require "rspec_spinner/spinner"
6
6
  require "rspec_spinner/bar"
7
7
 
8
8
  module RspecSpinner
9
- VERSION = '0.4.5'
9
+ VERSION = '0.4.8'
10
10
  end
11
11
 
12
12
  #module Spec
@@ -13,12 +13,10 @@ module RspecSpinner
13
13
 
14
14
  def start(example_count)
15
15
  @current = 0
16
- # @subject = "oi"
17
16
  @total = example_count
18
17
  @error_state = :all_passing
19
18
  @pbar = Rtui::Progress.new("#{example_count} examples", example_count,
20
19
  {:out => output, :components => [:percentage, :spinner, :stat]})
21
- @pbar.subject = "Starting..."
22
20
  end
23
21
 
24
22
  def example_started(example)
@@ -35,7 +33,8 @@ module RspecSpinner
35
33
 
36
34
  # third param is optional, because earlier versions of rspec sent only two args
37
35
  def example_pending(example, message, pending_caller=nil)
38
- immediately_dump_pending(example.full_description, message, pending_caller)
36
+ desc = example.respond_to?(:full_description) ? example.full_description : example.description
37
+ immediately_dump_pending(desc, message, pending_caller)
39
38
  mark_error_state_pending
40
39
  increment
41
40
  end
@@ -76,7 +75,8 @@ module RspecSpinner
76
75
  def immediately_dump_pending(desc, msg, called_from)
77
76
  erase_current_line
78
77
  output.puts yellow("PENDING SPEC:") + " #{desc} (#{msg})"
79
- output.puts " Called from #{called_from}" if called_from
78
+ output.puts format_backtrace(" Called from #{called_from}") if called_from
79
+ output.puts
80
80
  end
81
81
 
82
82
  def increment
@@ -86,7 +86,6 @@ module RspecSpinner
86
86
  @pbar.instance_variable_set("@previous", 0)
87
87
  @pbar.instance_variable_set("@title", "#{current}/#{total}")
88
88
  @pbar.inc
89
- # @pbar.subject = @subject if @subject
90
89
  end
91
90
  output.flush
92
91
  end
@@ -8,10 +8,13 @@ module RspecSpinner
8
8
  @error_state = :all_passing
9
9
  @pbar = Rtui::Progress.new("#{example_count} examples", example_count,
10
10
  {:out => output, :components => [:percentage, :spinner, :subject, :stat]})
11
+ @pbar.subject = "Starting..."
11
12
  end
12
13
 
13
14
  def example_started(example)
14
- @pbar.subject = example.description
15
+ # this is strange , w/o this mouth work, you got some weird lines
16
+ desc = example.description.to_s.chop.chomp.chop
17
+ @pbar.subject = desc
15
18
  super
16
19
  end
17
20
  end
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{rspec_spinner}
5
- s.version = "0.4.5"
5
+ s.version = "0.4.8"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Marcos Piccinini"]
9
- s.date = %q{2008-12-21}
9
+ s.date = %q{2008-12-22}
10
10
  s.description = %q{Some extra formatters for rspec}
11
11
  s.email = ["x@nofxx.com"]
12
12
  s.extra_rdoc_files = ["History.txt", "Manifest.txt", "PostInstall.txt", "README.rdoc"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec_spinner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.5
4
+ version: 0.4.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcos Piccinini
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-12-21 00:00:00 -02:00
12
+ date: 2008-12-22 00:00:00 -02:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency