rspec_spinner 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rspec_spinner.rb +1 -1
- data/lib/rspec_spinner/base.rb +2 -1
- data/lib/rspec_spinner/spinner.rb +6 -2
- data/rspec_spinner.gemspec +5 -5
- data/spec/rspec_spinner/base_spec.rb +3 -3
- metadata +3 -3
data/lib/rspec_spinner.rb
CHANGED
data/lib/rspec_spinner/base.rb
CHANGED
@@ -62,7 +62,8 @@ module RspecSpinner
|
|
62
62
|
erase_current_line
|
63
63
|
output.puts
|
64
64
|
output.print "#{counter.to_s}) "
|
65
|
-
|
65
|
+
# Rspec 1.2.2
|
66
|
+
output.puts colorize_failure("#{failure.header}\n#{failure.exception.message}", failure)
|
66
67
|
output.puts format_backtrace(failure.exception.backtrace)
|
67
68
|
output.puts
|
68
69
|
end
|
@@ -11,10 +11,14 @@ module RspecSpinner
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def example_started(example)
|
14
|
-
desc = example.description.
|
15
|
-
@pbar.subject = desc
|
14
|
+
desc = clean_text example.respond_to?(:description) ? example.description : example
|
15
|
+
@pbar.subject = desc
|
16
16
|
super
|
17
17
|
end
|
18
18
|
|
19
|
+
def clean_text(text)
|
20
|
+
text.respond_to?(:gsub) ? text.gsub(/\r|\n|\t/, "") : "No Description"
|
21
|
+
end
|
22
|
+
|
19
23
|
end
|
20
24
|
end
|
data/rspec_spinner.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{rspec_spinner}
|
5
|
-
s.version = "0.5.
|
5
|
+
s.version = "0.5.2"
|
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{2009-
|
9
|
+
s.date = %q{2009-03-24}
|
10
10
|
s.description = %q{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"]
|
@@ -27,18 +27,18 @@ Gem::Specification.new do |s|
|
|
27
27
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
28
28
|
s.add_runtime_dependency(%q<rspec>, [">= 1.1.11"])
|
29
29
|
s.add_runtime_dependency(%q<rtui>, [">= 0.1.8"])
|
30
|
-
s.add_development_dependency(%q<newgem>, [">= 1.
|
30
|
+
s.add_development_dependency(%q<newgem>, [">= 1.3.0"])
|
31
31
|
s.add_development_dependency(%q<hoe>, [">= 1.8.0"])
|
32
32
|
else
|
33
33
|
s.add_dependency(%q<rspec>, [">= 1.1.11"])
|
34
34
|
s.add_dependency(%q<rtui>, [">= 0.1.8"])
|
35
|
-
s.add_dependency(%q<newgem>, [">= 1.
|
35
|
+
s.add_dependency(%q<newgem>, [">= 1.3.0"])
|
36
36
|
s.add_dependency(%q<hoe>, [">= 1.8.0"])
|
37
37
|
end
|
38
38
|
else
|
39
39
|
s.add_dependency(%q<rspec>, [">= 1.1.11"])
|
40
40
|
s.add_dependency(%q<rtui>, [">= 0.1.8"])
|
41
|
-
s.add_dependency(%q<newgem>, [">= 1.
|
41
|
+
s.add_dependency(%q<newgem>, [">= 1.3.0"])
|
42
42
|
s.add_dependency(%q<hoe>, [">= 1.8.0"])
|
43
43
|
end
|
44
44
|
end
|
@@ -70,7 +70,7 @@ describe "Base" do
|
|
70
70
|
@options.should_receive(:colour).and_return(true)
|
71
71
|
@formatter.start(1)
|
72
72
|
@mock_fail = mock("Fail", :__full_description => "Error Failed")
|
73
|
-
@formatter.example_failed("spec", 98, Spec::Runner::Reporter::Failure.new(@mock_fail, RuntimeError.new))
|
73
|
+
@formatter.example_failed("spec", 98, Spec::Runner::Reporter::Failure.new(@mock_fail, RuntimeError.new, "oi"))
|
74
74
|
@io.string.should eql("\r \r1 examples: 0% | | ETA: --:--:--\r\e[K\n98) \e[35mRuntimeError in 'Error Failed'\nRuntimeError\e[0m\n\n\n1/1: 100% |====================================================| ETA: 00:00:00\r")
|
75
75
|
end
|
76
76
|
|
@@ -79,7 +79,7 @@ describe "Base" do
|
|
79
79
|
@options.should_receive(:colour).and_return(true)
|
80
80
|
@formatter.start(1)
|
81
81
|
@mock_fail = mock("Fail", :__full_description => "Pending Fixed")
|
82
|
-
@formatter.example_failed("spec", 98, Spec::Runner::Reporter::Failure.new(@mock_fail, Spec::Example::PendingExampleFixedError.new))
|
82
|
+
@formatter.example_failed("spec", 98, Spec::Runner::Reporter::Failure.new(@mock_fail, Spec::Example::PendingExampleFixedError.new, nil))
|
83
83
|
@io.string.should eql("\r \r1 examples: 0% | | ETA: --:--:--\r\e[K\n98) \e[34m'Pending Fixed' FIXED\nSpec::Example::PendingExampleFixedError\e[0m\n\n\n1/1: 100% |====================================================| ETA: 00:00:00\r")
|
84
84
|
end
|
85
85
|
|
@@ -103,7 +103,7 @@ describe "Base" do
|
|
103
103
|
it "should not dump anything on the end" do
|
104
104
|
@formatter.dump_failure.should be_nil
|
105
105
|
end
|
106
|
-
|
106
|
+
|
107
107
|
it "should ignore method missing" do
|
108
108
|
@formatter.method_missing(:foo).should be_nil
|
109
109
|
end
|
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.5.
|
4
|
+
version: 0.5.2
|
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: 2009-
|
12
|
+
date: 2009-03-24 00:00:00 -03:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -40,7 +40,7 @@ dependencies:
|
|
40
40
|
requirements:
|
41
41
|
- - ">="
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: 1.
|
43
|
+
version: 1.3.0
|
44
44
|
version:
|
45
45
|
- !ruby/object:Gem::Dependency
|
46
46
|
name: hoe
|