rspec-longrun 0.1.1 → 0.1.2
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.
- checksums.yaml +15 -0
- data/.travis.yml +6 -0
- data/Gemfile +2 -2
- data/lib/rspec/longrun/formatter.rb +17 -4
- data/lib/rspec/longrun/version.rb +1 -1
- data/spec/rspec/longrun/formatter_spec.rb +20 -16
- metadata +11 -20
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
NjhlOWMwMzViMGU4M2UxMjBmOWI4YTZkYTM3MGI5OTljNTI0OGJmMw==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
OWY4OTg0MmNlYTAxZWE4OGU4M2JlNzFlOTFhY2EzYTMzMjBlNDJmOQ==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
MzkyNTYzNjE0ZWZmZDQzMTE1OGIzNGQ0Y2M5Nzg5N2Q0MTdmZWMzZWM2ZDdm
|
10
|
+
NGUwZDE4MDAzZDJjZWE0MzE4ZjdmMjMwNDU4NzA1ZWE2ZTg1YjdiOWQ3ZGYy
|
11
|
+
MDZlOTlhMzhiMGQ5Mzg1OGVlZGU4NjlmNWY1NzliMGE4YzEzODI=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
NGI3YmMwNjI0ZjU0Mzk3OWViNTU0MDA0MTlhNjE1MDczNTE1MTliZTQ0MDEy
|
14
|
+
OGE1OGYyNDQ3OTZmODk0MmNhM2E1N2MyMWQwNzVmNzNhNDQ2ZWNhYzgzYzhl
|
15
|
+
ZGE5NGRjYmFhZjY3MDc1ODdiMTVkNDg3Y2U0ZTQ0ZTlkMjljYzM=
|
data/.travis.yml
ADDED
data/Gemfile
CHANGED
@@ -22,22 +22,22 @@ module RSpec
|
|
22
22
|
|
23
23
|
def example_started(example)
|
24
24
|
super(example)
|
25
|
-
begin_block(
|
25
|
+
begin_block(detail_color(example.description))
|
26
26
|
end
|
27
27
|
|
28
28
|
def example_passed(example)
|
29
29
|
super(example)
|
30
|
-
end_block(
|
30
|
+
end_block(success_color("OK"))
|
31
31
|
end
|
32
32
|
|
33
33
|
def example_pending(example)
|
34
34
|
super(example)
|
35
|
-
end_block(
|
35
|
+
end_block(pending_color("PENDING: " + example.execution_result[:pending_message]))
|
36
36
|
end
|
37
37
|
|
38
38
|
def example_failed(example)
|
39
39
|
super(example)
|
40
|
-
end_block(
|
40
|
+
end_block(failure_color("FAILED"))
|
41
41
|
end
|
42
42
|
|
43
43
|
def step_started(description)
|
@@ -48,6 +48,19 @@ module RSpec
|
|
48
48
|
end_block
|
49
49
|
end
|
50
50
|
|
51
|
+
protected
|
52
|
+
|
53
|
+
def self.alias_missing_method(method_name, fallback_method_name)
|
54
|
+
unless method_defined?(method_name)
|
55
|
+
alias_method method_name, fallback_method_name
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
alias_missing_method :detail_color, :cyan
|
60
|
+
alias_missing_method :success_color, :green
|
61
|
+
alias_missing_method :pending_color, :yellow
|
62
|
+
alias_missing_method :failure_color, :red
|
63
|
+
|
51
64
|
private
|
52
65
|
|
53
66
|
def current_block
|
@@ -19,6 +19,10 @@ describe RSpec::Longrun::Formatter do
|
|
19
19
|
output_buffer.string
|
20
20
|
end
|
21
21
|
|
22
|
+
def normalized_output
|
23
|
+
output.gsub(/0\.\d\ds/, "N.NNs")
|
24
|
+
end
|
25
|
+
|
22
26
|
module NoColor
|
23
27
|
|
24
28
|
def color_enabled?
|
@@ -46,13 +50,13 @@ describe RSpec::Longrun::Formatter do
|
|
46
50
|
end
|
47
51
|
|
48
52
|
it "outputs nested group names" do
|
49
|
-
|
53
|
+
normalized_output.should eql(undent(<<-EOF))
|
50
54
|
foo {
|
51
55
|
bar {
|
52
|
-
baz (
|
53
|
-
} (
|
54
|
-
qux (
|
55
|
-
} (
|
56
|
+
baz (N.NNs)
|
57
|
+
} (N.NNs)
|
58
|
+
qux (N.NNs)
|
59
|
+
} (N.NNs)
|
56
60
|
EOF
|
57
61
|
end
|
58
62
|
|
@@ -73,12 +77,12 @@ describe RSpec::Longrun::Formatter do
|
|
73
77
|
end
|
74
78
|
|
75
79
|
it "outputs example names and status" do
|
76
|
-
|
80
|
+
normalized_output.should eql(undent(<<-EOF))
|
77
81
|
suite {
|
78
|
-
works OK (
|
79
|
-
is unimplemented PENDING: implement me (
|
80
|
-
fails FAILED (
|
81
|
-
} (
|
82
|
+
works OK (N.NNs)
|
83
|
+
is unimplemented PENDING: implement me (N.NNs)
|
84
|
+
fails FAILED (N.NNs)
|
85
|
+
} (N.NNs)
|
82
86
|
EOF
|
83
87
|
end
|
84
88
|
|
@@ -102,15 +106,15 @@ describe RSpec::Longrun::Formatter do
|
|
102
106
|
end
|
103
107
|
|
104
108
|
it "outputs steps" do
|
105
|
-
|
109
|
+
normalized_output.should eql(undent(<<-EOF))
|
106
110
|
suite {
|
107
111
|
has steps {
|
108
|
-
Collect underpants (
|
112
|
+
Collect underpants (N.NNs)
|
109
113
|
Er ... {
|
110
|
-
(thinking) (
|
111
|
-
} (
|
112
|
-
} PENDING: Profit! (
|
113
|
-
} (
|
114
|
+
(thinking) (N.NNs)
|
115
|
+
} (N.NNs)
|
116
|
+
} PENDING: Profit! (N.NNs)
|
117
|
+
} (N.NNs)
|
114
118
|
EOF
|
115
119
|
end
|
116
120
|
|
metadata
CHANGED
@@ -1,32 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-longrun
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
5
|
-
prerelease:
|
4
|
+
version: 0.1.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Mike Williams
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2013-02-28 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
|
-
|
16
|
-
|
17
|
-
none: false
|
14
|
+
prerelease: false
|
15
|
+
version_requirements: !ruby/object:Gem::Requirement
|
18
16
|
requirements:
|
19
17
|
- - ! '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: 2.10.0
|
22
|
-
|
23
|
-
|
24
|
-
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
20
|
+
name: rspec-core
|
21
|
+
requirement: !ruby/object:Gem::Requirement
|
26
22
|
requirements:
|
27
23
|
- - ! '>='
|
28
24
|
- !ruby/object:Gem::Version
|
29
25
|
version: 2.10.0
|
26
|
+
type: :runtime
|
30
27
|
description:
|
31
28
|
email:
|
32
29
|
- mdub@dogbiscuit.org
|
@@ -36,6 +33,7 @@ extra_rdoc_files: []
|
|
36
33
|
files:
|
37
34
|
- .gitignore
|
38
35
|
- .rspec
|
36
|
+
- .travis.yml
|
39
37
|
- Gemfile
|
40
38
|
- LICENSE
|
41
39
|
- README.md
|
@@ -50,33 +48,26 @@ files:
|
|
50
48
|
- spec/rspec/longrun/formatter_spec.rb
|
51
49
|
homepage: http://github.com/mdub/rspec-longrun
|
52
50
|
licenses: []
|
51
|
+
metadata: {}
|
53
52
|
post_install_message:
|
54
53
|
rdoc_options: []
|
55
54
|
require_paths:
|
56
55
|
- lib
|
57
56
|
required_ruby_version: !ruby/object:Gem::Requirement
|
58
|
-
none: false
|
59
57
|
requirements:
|
60
58
|
- - ! '>='
|
61
59
|
- !ruby/object:Gem::Version
|
62
60
|
version: '0'
|
63
|
-
segments:
|
64
|
-
- 0
|
65
|
-
hash: 1493565332746203496
|
66
61
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
67
|
-
none: false
|
68
62
|
requirements:
|
69
63
|
- - ! '>='
|
70
64
|
- !ruby/object:Gem::Version
|
71
65
|
version: '0'
|
72
|
-
segments:
|
73
|
-
- 0
|
74
|
-
hash: 1493565332746203496
|
75
66
|
requirements: []
|
76
67
|
rubyforge_project:
|
77
|
-
rubygems_version:
|
68
|
+
rubygems_version: 2.0.0
|
78
69
|
signing_key:
|
79
|
-
specification_version:
|
70
|
+
specification_version: 4
|
80
71
|
summary: An RSpec formatter for long-running specs.
|
81
72
|
test_files:
|
82
73
|
- spec/rspec/longrun/formatter_spec.rb
|