testcube 0.1.2 → 0.1.3

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: f689b3808da322ea5b49372b875110972b8bd54a
4
- data.tar.gz: 817a040cf3b6a94705e2a118e0dcd3eca1928f25
3
+ metadata.gz: 9c947087972a57600c8bd6e979d1030791d01f99
4
+ data.tar.gz: fc02ff859b3b6d1fcd3c792d8f2ede453657e2e1
5
5
  SHA512:
6
- metadata.gz: cff73c0554625493cc2377656cf2d6f1e324e8273c86933911a8468c38bd07b38b16ad2633bbb217bfbbbc22b91ca5e9d070fbccceadea50960239ee1cca133a
7
- data.tar.gz: f270998d402517a29cc23fa435eb14ad8faa17f2b0588dcf980c96346684d4761dcca86b20a1e070bd1da096fe46aecf0e26668c9de767a8ae053b184b6dac7e
6
+ metadata.gz: 61f5839a1ec24beda41dbd8c0fee0cda0454a5b5875b731063879f9b01e0dc22f37356e468edd9c70476075bf017230eb88e53fc5dc128f6a8d6ef05aa73961f
7
+ data.tar.gz: 9ac190fdbe6a2d0e2880cf2b701cc9a0197f8e46a00177085ee76af08d31a065ddf5fa6c0b7c8f9b78cdb8ea707238ba93f31f025b094ad0e184e7fb58538110
@@ -10,6 +10,7 @@ module Testcube
10
10
  config.around(:each) do |example|
11
11
  Testcube.tracker.current_test_path = example.metadata[:file_path]
12
12
  Testcube.tracker.current_line_number = example.metadata[:line_number]
13
+ Testcube.tracker.current_description = example.metadata[:full_description]
13
14
  Testcube.tracker.start_timer
14
15
 
15
16
  example.run
@@ -5,7 +5,7 @@ module Testcube
5
5
  include Singleton
6
6
 
7
7
  attr_reader :test_files_with_time
8
- attr_writer :current_test_path, :current_line_number, :current_exception
8
+ attr_writer :current_test_path, :current_line_number, :current_exception, :current_description
9
9
 
10
10
  def initialize
11
11
  set_defaults
@@ -20,6 +20,7 @@ module Testcube
20
20
  @test_files_with_time.push({
21
21
  test_file: current_test_path,
22
22
  line_number: current_line_number,
23
+ description: current_description,
23
24
  status: current_exception ? :fail : :pass,
24
25
  # TODO: we could have a better way to filter the backtrace
25
26
  backtrace: current_exception ? current_exception.backtrace.select { |s| s !~ /gems\/.*(rspec|bin)/ } : nil,
@@ -37,6 +38,11 @@ module Testcube
37
38
  @current_line_number
38
39
  end
39
40
 
41
+ def current_description
42
+ raise("current_description needs to be set") unless @current_description
43
+ @current_description
44
+ end
45
+
40
46
  def current_exception
41
47
  # can be nil
42
48
  @current_exception
@@ -1,3 +1,3 @@
1
1
  module Testcube
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testcube
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ankur
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-12-22 00:00:00.000000000 Z
11
+ date: 2019-01-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http