Bacon_Colored 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Bacon_Colored.gemspec +3 -3
- data/VERSION +1 -1
- data/bin/test +14 -0
- data/lib/Bacon_Colored.rb +4 -1
- data/spec/main.rb +12 -6
- data/spec/tests/pass.rb +2 -2
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2ec64fb22d07fbe9ecabf76e5f4f06ff046e73f1
|
4
|
+
data.tar.gz: 8ea0985d3cc853b760c69fe6ec6a5c7a1fc4d3eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eef874770e791d847501c6a188041e41f5190acebe3333fa0a1eeb2b743e01718d22611b9c6a6e79999bcfddb0e4db7ca24348a6343424ae07402dcac36658d0
|
7
|
+
data.tar.gz: 587fd6f8a39b4598b61cff6ecd073516dcde2f1e2034d7d5597219fdcaa755cad609cc12219e51e6b84cffad4d5408260c0b60abcca5be42c72461ca3cdc3f3e
|
data/Bacon_Colored.gemspec
CHANGED
@@ -7,10 +7,10 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.authors = ["da99"]
|
8
8
|
s.email = ["i-hate-spam-45671204@mailinator.com"]
|
9
9
|
s.homepage = "https://github.com/da99/Bacon_Colored"
|
10
|
-
s.summary = %q{Adds color to your
|
10
|
+
s.summary = %q{Adds color to your Bacon runs.}
|
11
11
|
s.description = %q{
|
12
|
-
|
13
|
-
|
12
|
+
require "bacon";
|
13
|
+
require "Bacon_Colored";
|
14
14
|
}
|
15
15
|
|
16
16
|
s.rubyforge_project = "Bacon_Colored"
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
data/bin/test
ADDED
data/lib/Bacon_Colored.rb
CHANGED
@@ -29,12 +29,15 @@ module Bacon
|
|
29
29
|
def handle_summary
|
30
30
|
specs, reqs, fails, errs = Counter.values_at(:specifications, :requirements, :failed, :errors)
|
31
31
|
all_pass = reqs > 1 && (fails == errs) && (errs == 0)
|
32
|
+
single_pass = reqs == 1 && specs == 1 && (errs == 0) && (fails == errs)
|
32
33
|
|
33
34
|
print ErrorLog if Backtraces
|
34
35
|
|
35
36
|
print "%d specifications (%d requirements)".send(all_pass ? :green : :to_s ) % [ specs, reqs ]
|
36
37
|
|
37
|
-
if
|
38
|
+
if single_pass
|
39
|
+
print( ". Just one requirement and it passes. ".green )
|
40
|
+
elsif all_pass
|
38
41
|
print( ". All pass. ".green )
|
39
42
|
else
|
40
43
|
print ", "
|
data/spec/main.rb
CHANGED
@@ -1,32 +1,38 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
#
|
2
|
+
#
|
3
3
|
require File.expand_path('spec/helper')
|
4
4
|
require 'Bacon_Colored'
|
5
5
|
|
6
6
|
describe "Bacon_Colored" do
|
7
|
-
|
7
|
+
|
8
8
|
before do
|
9
9
|
@run = lambda { |name|
|
10
10
|
%x! bundle exec bacon spec/tests/#{name}.rb!
|
11
11
|
}
|
12
12
|
end
|
13
|
-
|
13
|
+
|
14
|
+
it("prints green when: 1 requirement and it passes") {
|
15
|
+
result = @run.call("pass")
|
16
|
+
target = "Just one requirement and it passes."
|
17
|
+
result[ target ].should.be == target
|
18
|
+
}
|
19
|
+
|
14
20
|
it("prints green when tests pass.") {
|
15
21
|
target = "\e[32m✓ \e[0mpasses"
|
16
22
|
result = @run.call("pass")
|
17
23
|
result[ target ].should.be == target
|
18
24
|
}
|
19
|
-
|
25
|
+
|
20
26
|
it("prints red when tests fail.") {
|
21
27
|
target = "\e[31m✗ \e[0mfails\e[31m [FAILED]\e[0m"
|
22
28
|
@run.call("fail")[ target ].should == target
|
23
29
|
}
|
24
|
-
|
30
|
+
|
25
31
|
it("prints green/red when tests pass/fail.") {
|
26
32
|
out = @run.call("pass_fail")
|
27
33
|
out["\e[32m✓ \e[0mpasses"].should.not.be == nil
|
28
34
|
out["\e[31m✗ \e[0mfails\e[31m [FAILED]\e[0m"].should.not.be == nil
|
29
35
|
}
|
30
|
-
|
36
|
+
|
31
37
|
end # === describe Bacon_Colored
|
32
38
|
|
data/spec/tests/pass.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: Bacon_Colored
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- da99
|
@@ -52,11 +52,11 @@ dependencies:
|
|
52
52
|
- - '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
-
description: "\n
|
56
|
-
\ "
|
55
|
+
description: "\n require \"bacon\";\n require \"Bacon_Colored\";\n "
|
57
56
|
email:
|
58
57
|
- i-hate-spam-45671204@mailinator.com
|
59
|
-
executables:
|
58
|
+
executables:
|
59
|
+
- test
|
60
60
|
extensions: []
|
61
61
|
extra_rdoc_files: []
|
62
62
|
files:
|
@@ -68,6 +68,7 @@ files:
|
|
68
68
|
- README.md
|
69
69
|
- Rakefile
|
70
70
|
- VERSION
|
71
|
+
- bin/test
|
71
72
|
- lib/Bacon_Colored.rb
|
72
73
|
- spec/helper.rb
|
73
74
|
- spec/main.rb
|
@@ -96,5 +97,5 @@ rubyforge_project: Bacon_Colored
|
|
96
97
|
rubygems_version: 2.0.7
|
97
98
|
signing_key:
|
98
99
|
specification_version: 4
|
99
|
-
summary: Adds color to your
|
100
|
+
summary: Adds color to your Bacon runs.
|
100
101
|
test_files: []
|