luna-rspec-formatters 1.2.1 → 1.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1c410cfb9635a5c14f5726e16dddd5df35c04581
4
- data.tar.gz: d1cad683ea2fef1c87adbbc0bd799308a724501e
3
+ metadata.gz: 4d15a252400145ba0f509985ecca7cd26ddfadd1
4
+ data.tar.gz: 4a0cf5b083127914c5680e35c953703e0d0f72c5
5
5
  SHA512:
6
- metadata.gz: a92ffff0d7d06e31da37abfdea895dffa56ef097f9cc11a60f7edaf230102a20a27a4fbcd3b2109fe6a339ad6827e67422d87b876411e4f0649cdd7dc872bde7
7
- data.tar.gz: 77a244dec13d41061a62a7842d6cf4cc37fbb6ad8aa14c9fb72a699f112f05beb4bb08c0e1b6b809f27342d9b1cad826169ddf0277642c6c1cfc03619139215a
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
- super(e)
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
- super(e)
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
- super(e)
55
+ output.print("\s")
45
56
  print_description(e, :pending)
46
57
  end
47
58
 
@@ -1,7 +1,7 @@
1
1
  module Luna
2
2
  module Rspec
3
3
  module Formatters
4
- VERSION = "1.2.1"
4
+ VERSION = "1.2.2"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: luna-rspec-formatters
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jordon Bedwell