rspec_table_formatter 0.1.14 → 0.1.15

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
  SHA256:
3
- metadata.gz: 86be40cfacbfc7b5293365343c449a63e47bed98066eebce7b2d5be196e79ce5
4
- data.tar.gz: 77c16143ba8006a866251ac176cf6c8d4852ac6931470a0d70cdca0c0be0b0f5
3
+ metadata.gz: 5c9f9ae1a9b8a9b7e421c6defd38982205358510ca53dac34dc06e53e59e2fb2
4
+ data.tar.gz: 5f143e17c620b098556bb8836f1d5e1e8aa4388101d29078168d5bb079f15907
5
5
  SHA512:
6
- metadata.gz: 31a7eb8e21640be2d01d80f4fc8ad68196eda3e6a667d4d14bf7c132d89b2de109cc39a4a021c5746aec9e440ada8b32012c93d91be2d6550e291cec877babca
7
- data.tar.gz: 218e22f36bbf15c3025af9c16c8113a5e60750c50e94c9c23e2ba2138ebe03225cb825142824bd2702ee5617ee692dcc84e82ad46e27e8158388f7e0f896c533
6
+ metadata.gz: 168460fadd24dff23eb02e25af1f3a8135fac8bb1044770a75e9fd1ba921aef09c82cc808048c98174b299c777d91ced3d595abed2cfa04e8e64c3e74f6f6697
7
+ data.tar.gz: c4d078cac4e151f0944b1ec9fe6e289615d03b38e24ec26d73dd3d506fc8f2d284813f5f34147e2040ce3afce16f124437f1cacf634e30b1b246d1f415705efc
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rspec_table_formatter (0.1.14)
4
+ rspec_table_formatter (0.1.15)
5
5
  terminal-table (~> 3.0.2)
6
6
 
7
7
  GEM
@@ -1,5 +1,8 @@
1
+ require 'singleton'
2
+
1
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 @@ class RspecTableFormatter
21
24
  end
22
25
 
23
26
  def headers
24
- [@test_case_header, @expected_result_header, @status_header]
27
+ [ test_case_header, expected_result_header, status_header]
25
28
  end
26
29
  end
27
30
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  class RspecTableFormatter
4
4
  module Version
5
- VERSION = '0.1.14'
5
+ VERSION = '0.1.15'
6
6
  end
7
7
  end
@@ -8,9 +8,6 @@ require_relative './rspec_table_formatter/configurations'
8
8
  # main class for formatter
9
9
  class RspecTableFormatter
10
10
  class Error < StandardError; end
11
-
12
- @configs = Configurations.new
13
-
14
11
  RSpec::Core::Formatters.register self, :dump_summary
15
12
 
16
13
  def initialize(output)
@@ -19,12 +16,12 @@ class RspecTableFormatter
19
16
 
20
17
  def dump_summary(notification)
21
18
  examples = notification.examples
22
- @output << TableBuilder.new(examples, @configs).generate_table.to_s + "\n"
19
+ @output << TableBuilder.new(examples, Configurations.instance).generate_table.to_s + "\n"
23
20
  end
24
21
 
25
22
  class << self
26
23
  def configure
27
- yield @configs if block_given?
24
+ yield Configurations.instance if block_given?
28
25
  end
29
26
  end
30
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.14
4
+ version: 0.1.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nijeesh