rspec_table_formatter 0.1.13 → 0.1.15
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c9f9ae1a9b8a9b7e421c6defd38982205358510ca53dac34dc06e53e59e2fb2
|
4
|
+
data.tar.gz: 5f143e17c620b098556bb8836f1d5e1e8aa4388101d29078168d5bb079f15907
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 168460fadd24dff23eb02e25af1f3a8135fac8bb1044770a75e9fd1ba921aef09c82cc808048c98174b299c777d91ced3d595abed2cfa04e8e64c3e74f6f6697
|
7
|
+
data.tar.gz: c4d078cac4e151f0944b1ec9fe6e289615d03b38e24ec26d73dd3d506fc8f2d284813f5f34147e2040ce3afce16f124437f1cacf634e30b1b246d1f415705efc
|
data/Gemfile.lock
CHANGED
@@ -1,5 +1,8 @@
|
|
1
|
-
|
1
|
+
require 'singleton'
|
2
|
+
|
3
|
+
class RspecTableFormatter
|
2
4
|
class Configurations
|
5
|
+
include Singleton
|
3
6
|
|
4
7
|
attr_accessor :passed_message, :failed_message, :pending_message,
|
5
8
|
:test_case_header, :expected_result_header, :status_header,
|
@@ -21,7 +24,7 @@ module RspecTableFormatter
|
|
21
24
|
end
|
22
25
|
|
23
26
|
def headers
|
24
|
-
[
|
27
|
+
[ test_case_header, expected_result_header, status_header]
|
25
28
|
end
|
26
29
|
end
|
27
30
|
end
|
@@ -1,14 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'rspec_table_formatter/version'
|
4
|
+
|
4
5
|
require_relative './table_builder'
|
6
|
+
require_relative './rspec_table_formatter/configurations'
|
5
7
|
|
6
8
|
# main class for formatter
|
7
9
|
class RspecTableFormatter
|
8
10
|
class Error < StandardError; end
|
9
|
-
|
10
|
-
@configs = Configurations.new
|
11
|
-
|
12
11
|
RSpec::Core::Formatters.register self, :dump_summary
|
13
12
|
|
14
13
|
def initialize(output)
|
@@ -17,12 +16,12 @@ class RspecTableFormatter
|
|
17
16
|
|
18
17
|
def dump_summary(notification)
|
19
18
|
examples = notification.examples
|
20
|
-
@output << TableBuilder.new(examples,
|
19
|
+
@output << TableBuilder.new(examples, Configurations.instance).generate_table.to_s + "\n"
|
21
20
|
end
|
22
21
|
|
23
22
|
class << self
|
24
23
|
def configure
|
25
|
-
yield
|
24
|
+
yield Configurations.instance if block_given?
|
26
25
|
end
|
27
26
|
end
|
28
27
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec_table_formatter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nijeesh
|
@@ -50,7 +50,7 @@ files:
|
|
50
50
|
- bin/console
|
51
51
|
- bin/setup
|
52
52
|
- lib/rspec_table_formatter.rb
|
53
|
-
- lib/rspec_table_formatter/
|
53
|
+
- lib/rspec_table_formatter/configurations.rb
|
54
54
|
- lib/rspec_table_formatter/version.rb
|
55
55
|
- lib/table_builder.rb
|
56
56
|
- rspec_table_formatter.gemspec
|