luna-rspec-formatters 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d15a252400145ba0f509985ecca7cd26ddfadd1
|
4
|
+
data.tar.gz: 4a0cf5b083127914c5680e35c953703e0d0f72c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 968c60f4915d5fbf98ecc4fa480ff6207f488fd948d821603d8162d8f6ca81c4b2f9486b2cb9915ee70df3dc9165a624f918981c7741a51a1e576021c2c9aaa9
|
7
|
+
data.tar.gz: 850fc64e07cb31198f066f1bd8f8cc3ead14a79defd93653162ca8f271f81c8394fddbe246b814fa903e78327318dbebf4618f948306a4b0d4cc5a3f5a32cb18
|
@@ -11,22 +11,33 @@ module Luna
|
|
11
11
|
:example_passed, :example_pending, :example_failed
|
12
12
|
end
|
13
13
|
|
14
|
+
# ---------------------------------------------------------------------
|
15
|
+
|
16
|
+
[:success, :failure, :pending].each do |m|
|
17
|
+
define_method "#{m}_color" do |v|
|
18
|
+
defined?(super) ? super(v) : \
|
19
|
+
::RSpec::Core::Formatters::ConsoleCodes.wrap(v, m)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
# ---------------------------------------------------------------------
|
24
|
+
|
14
25
|
def start(*args)
|
15
|
-
super
|
26
|
+
super(*args) if defined?(super)
|
16
27
|
output.puts
|
17
28
|
end
|
18
29
|
|
19
30
|
# ---------------------------------------------------------------------
|
20
31
|
|
21
|
-
def start_dump
|
22
|
-
super
|
32
|
+
def start_dump(*args)
|
33
|
+
super(*args) if defined?(super)
|
23
34
|
output.puts
|
24
35
|
end
|
25
36
|
|
26
37
|
# ---------------------------------------------------------------------
|
27
38
|
|
28
39
|
def example_passed(e)
|
29
|
-
super(e)
|
40
|
+
super(e) if defined?(super)
|
30
41
|
output.print("\s")
|
31
42
|
output.print(success_color("\u2713"))
|
32
43
|
end
|
@@ -34,7 +45,7 @@ module Luna
|
|
34
45
|
# ---------------------------------------------------------------------
|
35
46
|
|
36
47
|
def example_failed(e)
|
37
|
-
super(e)
|
48
|
+
super(e) if defined?(super)
|
38
49
|
output.print("\s")
|
39
50
|
output.print(failure_color("\u2718"))
|
40
51
|
end
|
@@ -42,7 +53,7 @@ module Luna
|
|
42
53
|
# ---------------------------------------------------------------------
|
43
54
|
|
44
55
|
def example_pending(e)
|
45
|
-
super(e)
|
56
|
+
super(e) if defined?(super)
|
46
57
|
output.print("\s")
|
47
58
|
output.print(pending_color("\u203D"))
|
48
59
|
end
|
@@ -12,36 +12,47 @@ module Luna
|
|
12
12
|
:example_passed, :example_pending, :example_failed
|
13
13
|
end
|
14
14
|
|
15
|
+
# ---------------------------------------------------------------------
|
16
|
+
|
17
|
+
[:success, :failure, :pending].each do |m|
|
18
|
+
define_method "#{m}_color" do |v|
|
19
|
+
defined?(super) ? super(v) : \
|
20
|
+
::RSpec::Core::Formatters::ConsoleCodes.wrap(v, m)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
# ---------------------------------------------------------------------
|
25
|
+
|
15
26
|
def start(*args)
|
16
|
-
super
|
27
|
+
super(*args) if defined?(super)
|
17
28
|
output.puts
|
18
29
|
end
|
19
30
|
|
20
31
|
# ---------------------------------------------------------------------
|
21
32
|
|
22
|
-
def start_dump
|
23
|
-
super
|
33
|
+
def start_dump(*args)
|
34
|
+
super(*args) if defined?(super)
|
24
35
|
output.puts
|
25
36
|
end
|
26
37
|
|
27
38
|
# ---------------------------------------------------------------------
|
28
39
|
|
29
40
|
def example_passed(e)
|
30
|
-
|
41
|
+
output.print("\s")
|
31
42
|
print_description(e, :success)
|
32
43
|
end
|
33
44
|
|
34
45
|
# ---------------------------------------------------------------------
|
35
46
|
|
36
47
|
def example_failed(e)
|
37
|
-
|
48
|
+
output.print("\s")
|
38
49
|
print_description(e, :failure)
|
39
50
|
end
|
40
51
|
|
41
52
|
# ---------------------------------------------------------------------
|
42
53
|
|
43
54
|
def example_pending(e)
|
44
|
-
|
55
|
+
output.print("\s")
|
45
56
|
print_description(e, :pending)
|
46
57
|
end
|
47
58
|
|