assert 2.16.5 → 2.18.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 +7 -7
- data/Gemfile +3 -1
- data/README.md +79 -54
- data/assert.gemspec +6 -5
- data/bin/assert +4 -4
- data/lib/assert.rb +8 -18
- data/lib/assert/actual_value.rb +127 -0
- data/lib/assert/assert_runner.rb +7 -10
- data/lib/assert/assertions.rb +15 -28
- data/lib/assert/cli.rb +41 -57
- data/lib/assert/config.rb +8 -12
- data/lib/assert/config_helpers.rb +6 -10
- data/lib/assert/context.rb +30 -24
- data/lib/assert/context/let_dsl.rb +13 -0
- data/lib/assert/context/method_missing.rb +19 -0
- data/lib/assert/context/setup_dsl.rb +0 -4
- data/lib/assert/context/subject_dsl.rb +0 -4
- data/lib/assert/context/suite_dsl.rb +0 -4
- data/lib/assert/context/test_dsl.rb +5 -9
- data/lib/assert/context_info.rb +2 -6
- data/lib/assert/default_runner.rb +1 -5
- data/lib/assert/default_suite.rb +1 -6
- data/lib/assert/default_view.rb +8 -12
- data/lib/assert/factory.rb +1 -4
- data/lib/assert/file_line.rb +0 -4
- data/lib/assert/macro.rb +1 -4
- data/lib/assert/macros/methods.rb +5 -11
- data/lib/assert/result.rb +19 -34
- data/lib/assert/runner.rb +12 -11
- data/lib/assert/stub.rb +16 -2
- data/lib/assert/suite.rb +3 -7
- data/lib/assert/test.rb +13 -18
- data/lib/assert/utils.rb +8 -12
- data/lib/assert/version.rb +1 -1
- data/lib/assert/view.rb +18 -21
- data/lib/assert/view_helpers.rb +6 -17
- data/log/{.gitkeep → .keep} +0 -0
- data/test/helper.rb +26 -41
- data/test/support/factory.rb +20 -6
- data/test/support/inherited_stuff.rb +0 -2
- data/test/system/stub_tests.rb +350 -354
- data/test/system/test_tests.rb +119 -133
- data/test/unit/actual_value_tests.rb +335 -0
- data/test/unit/assert_tests.rb +125 -52
- data/test/unit/assertions/assert_block_tests.rb +34 -37
- data/test/unit/assertions/assert_empty_tests.rb +38 -38
- data/test/unit/assertions/assert_equal_tests.rb +84 -86
- data/test/unit/assertions/assert_file_exists_tests.rb +37 -39
- data/test/unit/assertions/assert_includes_tests.rb +45 -46
- data/test/unit/assertions/assert_instance_of_tests.rb +39 -40
- data/test/unit/assertions/assert_kind_of_tests.rb +39 -40
- data/test/unit/assertions/assert_match_tests.rb +39 -40
- data/test/unit/assertions/assert_nil_tests.rb +35 -38
- data/test/unit/assertions/assert_raises_tests.rb +58 -62
- data/test/unit/assertions/assert_respond_to_tests.rb +41 -42
- data/test/unit/assertions/assert_same_tests.rb +94 -90
- data/test/unit/assertions/assert_true_false_tests.rb +67 -69
- data/test/unit/assertions_tests.rb +17 -19
- data/test/unit/config_helpers_tests.rb +41 -43
- data/test/unit/config_tests.rb +42 -46
- data/test/unit/context/let_dsl_tests.rb +10 -0
- data/test/unit/context/setup_dsl_tests.rb +72 -91
- data/test/unit/context/subject_dsl_tests.rb +18 -51
- data/test/unit/context/suite_dsl_tests.rb +19 -23
- data/test/unit/context/test_dsl_tests.rb +52 -59
- data/test/unit/context_info_tests.rb +19 -21
- data/test/unit/context_tests.rb +175 -178
- data/test/unit/default_runner_tests.rb +4 -10
- data/test/unit/default_suite_tests.rb +54 -59
- data/test/unit/factory_tests.rb +6 -9
- data/test/unit/file_line_tests.rb +34 -40
- data/test/unit/macro_tests.rb +11 -20
- data/test/unit/result_tests.rb +156 -182
- data/test/unit/runner_tests.rb +72 -79
- data/test/unit/suite_tests.rb +62 -63
- data/test/unit/test_tests.rb +143 -147
- data/test/unit/utils_tests.rb +49 -62
- data/test/unit/view_helpers_tests.rb +67 -70
- data/test/unit/view_tests.rb +26 -32
- metadata +54 -47
- data/.assert.rb +0 -3
- data/.gitignore +0 -19
data/lib/assert/runner.rb
CHANGED
@@ -1,9 +1,8 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require
|
1
|
+
require "assert/config_helpers"
|
2
|
+
require "assert/suite"
|
3
|
+
require "assert/view"
|
4
4
|
|
5
5
|
module Assert
|
6
|
-
|
7
6
|
class Runner
|
8
7
|
include Assert::ConfigHelpers
|
9
8
|
|
@@ -29,12 +28,16 @@ module Assert
|
|
29
28
|
self.view.puts ", seeded with \"#{self.runner_seed}\""
|
30
29
|
end
|
31
30
|
|
32
|
-
# if INFO signal requested (Ctrl+T on Macs), process it
|
33
31
|
@current_running_test = nil
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
32
|
+
|
33
|
+
# if SIGINFO available (ie on OSX, not on BSD) and if SIGINFO requested
|
34
|
+
# (Ctrl+T on Macs), process it
|
35
|
+
if Signal.list.keys.include?("INFO")
|
36
|
+
Signal.trap("INFO") do
|
37
|
+
self.on_info(@current_running_test)
|
38
|
+
self.suite.on_info(@current_running_test)
|
39
|
+
self.view.on_info(@current_running_test)
|
40
|
+
end
|
38
41
|
end
|
39
42
|
|
40
43
|
begin
|
@@ -99,7 +102,5 @@ module Assert
|
|
99
102
|
self.suite.sorted_tests_to_run{ rand self.tests_to_run_count }
|
100
103
|
end
|
101
104
|
end
|
102
|
-
|
103
105
|
end
|
104
|
-
|
105
106
|
end
|
data/lib/assert/stub.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
|
-
require
|
1
|
+
require "much-stub"
|
2
2
|
|
3
3
|
module Assert
|
4
|
-
|
5
4
|
def self.stubs
|
6
5
|
MuchStub.stubs
|
7
6
|
end
|
@@ -10,6 +9,10 @@ module Assert
|
|
10
9
|
MuchStub.stub(*args, &block)
|
11
10
|
end
|
12
11
|
|
12
|
+
def self.stub_on_call(*args, &block)
|
13
|
+
MuchStub.stub_on_call(*args, &block)
|
14
|
+
end
|
15
|
+
|
13
16
|
def self.unstub(*args)
|
14
17
|
MuchStub.unstub(*args)
|
15
18
|
end
|
@@ -28,4 +31,15 @@ module Assert
|
|
28
31
|
end
|
29
32
|
end
|
30
33
|
|
34
|
+
def self.stub_tap(*args, &block)
|
35
|
+
MuchStub.tap(*args, &block)
|
36
|
+
end
|
37
|
+
|
38
|
+
def self.stub_tap_on_call(*args, &block)
|
39
|
+
MuchStub.tap_on_call(*args, &block)
|
40
|
+
end
|
41
|
+
|
42
|
+
def self.stub_spy(*args, &block)
|
43
|
+
MuchStub.spy(*args, &block)
|
44
|
+
end
|
31
45
|
end
|
data/lib/assert/suite.rb
CHANGED
@@ -1,14 +1,12 @@
|
|
1
|
-
require
|
2
|
-
require
|
1
|
+
require "assert/config_helpers"
|
2
|
+
require "assert/test"
|
3
3
|
|
4
4
|
module Assert
|
5
|
-
|
6
5
|
# This is the base suite. It loads the tests to run in memory and provides
|
7
6
|
# methods for these tests that the runner/view uses for handling and
|
8
7
|
# presentation purposes. It also stores suite-level setups and teardowns.
|
9
8
|
# Override the test/result count methods and the callbacks as needed. See
|
10
9
|
# the default suite for example usage.
|
11
|
-
|
12
10
|
class Suite
|
13
11
|
include Assert::ConfigHelpers
|
14
12
|
|
@@ -97,11 +95,9 @@ module Assert
|
|
97
95
|
def on_interrupt(err); end
|
98
96
|
|
99
97
|
def inspect
|
100
|
-
"#<#{self.class}:#{
|
98
|
+
"#<#{self.class}:#{"0x0%x" % (object_id << 1)}"\
|
101
99
|
" test_count=#{self.test_count.inspect}"\
|
102
100
|
" result_count=#{self.result_count.inspect}>"
|
103
101
|
end
|
104
|
-
|
105
102
|
end
|
106
|
-
|
107
103
|
end
|
data/lib/assert/test.rb
CHANGED
@@ -1,14 +1,11 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require
|
1
|
+
require "stringio"
|
2
|
+
require "assert/file_line"
|
3
|
+
require "assert/result"
|
4
4
|
|
5
5
|
module Assert
|
6
|
-
|
7
6
|
class Test
|
8
|
-
|
9
|
-
#
|
10
|
-
# produce results
|
11
|
-
|
7
|
+
# Test is some code/method to run in the scope of a Context that may
|
8
|
+
# produce results.
|
12
9
|
def self.name_file_line_context_data(ci, name)
|
13
10
|
{ :name => ci.test_name(name),
|
14
11
|
:file_line => ci.called_from
|
@@ -37,18 +34,18 @@ module Assert
|
|
37
34
|
end
|
38
35
|
|
39
36
|
def file_line
|
40
|
-
@file_line ||= FileLine.parse((@build_data[:file_line] ||
|
37
|
+
@file_line ||= FileLine.parse((@build_data[:file_line] || "").to_s)
|
41
38
|
end
|
42
39
|
|
43
40
|
def file_name; self.file_line.file; end
|
44
41
|
def line_num; self.file_line.line.to_i; end
|
45
42
|
|
46
43
|
def name
|
47
|
-
@name ||= (@build_data[:name] ||
|
44
|
+
@name ||= (@build_data[:name] || "")
|
48
45
|
end
|
49
46
|
|
50
47
|
def output
|
51
|
-
@output ||= (@build_data[:output] ||
|
48
|
+
@output ||= (@build_data[:output] || "")
|
52
49
|
end
|
53
50
|
|
54
51
|
def run_time
|
@@ -90,16 +87,16 @@ module Assert
|
|
90
87
|
attributes_string = ([:name, :context_info].collect do |attr|
|
91
88
|
"@#{attr}=#{self.send(attr).inspect}"
|
92
89
|
end).join(" ")
|
93
|
-
"#<#{self.class}:#{
|
90
|
+
"#<#{self.class}:#{"0x0%x" % (object_id << 1)} #{attributes_string}>"
|
94
91
|
end
|
95
92
|
|
96
93
|
private
|
97
94
|
|
98
95
|
def run_test(scope)
|
99
96
|
begin
|
100
|
-
# run any assert style
|
97
|
+
# run any assert style "setup do" setups
|
101
98
|
self.context_class.run_setups(scope)
|
102
|
-
# run any test/unit style
|
99
|
+
# run any test/unit style "def setup" setups
|
103
100
|
scope.setup if scope.respond_to?(:setup)
|
104
101
|
# run the code block
|
105
102
|
scope.instance_eval(&(self.code || proc{}))
|
@@ -113,9 +110,9 @@ module Assert
|
|
113
110
|
capture_result(Result::Error, err)
|
114
111
|
ensure
|
115
112
|
begin
|
116
|
-
# run any assert style
|
113
|
+
# run any assert style "teardown do" teardowns
|
117
114
|
self.context_class.run_teardowns(scope)
|
118
|
-
# run any test/unit style
|
115
|
+
# run any test/unit style "def teardown" teardowns
|
119
116
|
scope.teardown if scope.respond_to?(:teardown)
|
120
117
|
rescue Result::TestFailure => err
|
121
118
|
capture_result(Result::Fail, err)
|
@@ -147,7 +144,5 @@ module Assert
|
|
147
144
|
def capture_io
|
148
145
|
StringIO.new(self.output, "a+")
|
149
146
|
end
|
150
|
-
|
151
147
|
end
|
152
|
-
|
153
148
|
end
|
data/lib/assert/utils.rb
CHANGED
@@ -1,9 +1,7 @@
|
|
1
|
-
require
|
1
|
+
require "assert"
|
2
2
|
|
3
3
|
module Assert
|
4
|
-
|
5
4
|
module Utils
|
6
|
-
|
7
5
|
# show objects in a human-readable manner. Either inspects or pretty-prints
|
8
6
|
# them depending on settings.
|
9
7
|
def self.show(obj, config)
|
@@ -16,7 +14,7 @@ module Assert
|
|
16
14
|
# expands on the basic `show` util by escaping newlines and making object id
|
17
15
|
# hex-values generic.
|
18
16
|
def self.show_for_diff(obj, config)
|
19
|
-
show(obj, config).gsub(/\\n/, "\n").gsub(/:0x[a-fA-F0-9]{4,}/m,
|
17
|
+
show(obj, config).gsub(/\\n/, "\n").gsub(/:0x[a-fA-F0-9]{4,}/m, ":0xXXXXXX")
|
20
18
|
end
|
21
19
|
|
22
20
|
# open a tempfile and yield it
|
@@ -30,8 +28,8 @@ module Assert
|
|
30
28
|
|
31
29
|
# Get a proc that uses stdlib `PP.pp` to pretty print objects
|
32
30
|
def self.stdlib_pp_proc(width = nil)
|
33
|
-
require
|
34
|
-
Proc.new{ |obj| PP.pp(obj,
|
31
|
+
require "pp"
|
32
|
+
Proc.new{ |obj| PP.pp(obj, "", width || 79).strip }
|
35
33
|
end
|
36
34
|
|
37
35
|
# Return true if if either show output has newlines or is bigger than 29 chars
|
@@ -46,8 +44,8 @@ module Assert
|
|
46
44
|
def self.syscmd_diff_proc(syscmd = "diff --unified=-1")
|
47
45
|
Proc.new do |exp_show_output, act_show_output|
|
48
46
|
result = ""
|
49
|
-
tempfile(
|
50
|
-
tempfile(
|
47
|
+
tempfile("exp_show_output", exp_show_output) do |a|
|
48
|
+
tempfile("act_show_output", act_show_output) do |b|
|
51
49
|
result = `#{syscmd} #{a.path} #{b.path}`.strip
|
52
50
|
result.sub!(/^\-\-\- .+/, "--- expected")
|
53
51
|
result.sub!(/^\+\+\+ .+/, "+++ actual")
|
@@ -65,18 +63,16 @@ module Assert
|
|
65
63
|
cmd = [
|
66
64
|
"git diff --no-ext-diff --name-only #{config.changed_ref}", # changed files
|
67
65
|
"git ls-files --others --exclude-standard" # added files
|
68
|
-
].map{ |c| "#{c} -- #{test_paths.join(
|
69
|
-
Assert::CLI.bench(
|
66
|
+
].map{ |c| "#{c} -- #{test_paths.join(" ")}" }.join(" && ")
|
67
|
+
Assert::CLI.bench("Load only changed files") do
|
70
68
|
files = `#{cmd}`.split("\n")
|
71
69
|
end
|
72
70
|
puts Assert::CLI.debug_msg(" `#{cmd}`") if config.debug
|
73
71
|
files
|
74
72
|
end
|
75
73
|
end
|
76
|
-
|
77
74
|
end
|
78
75
|
|
79
76
|
# alias for brevity
|
80
77
|
U = Utils
|
81
|
-
|
82
78
|
end
|
data/lib/assert/version.rb
CHANGED
data/lib/assert/view.rb
CHANGED
@@ -1,10 +1,9 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require
|
4
|
-
require
|
1
|
+
require "assert/config"
|
2
|
+
require "assert/config_helpers"
|
3
|
+
require "assert/suite"
|
4
|
+
require "assert/view_helpers"
|
5
5
|
|
6
6
|
module Assert
|
7
|
-
|
8
7
|
class View
|
9
8
|
include Assert::ConfigHelpers
|
10
9
|
include Assert::ViewHelpers
|
@@ -15,12 +14,12 @@ module Assert
|
|
15
14
|
|
16
15
|
def self.require_user_view(view_name)
|
17
16
|
views_file = File.expand_path(
|
18
|
-
File.join("#{ENV[
|
17
|
+
File.join("#{ENV["HOME"]}/.assert/views", view_name, "lib", view_name)
|
19
18
|
)
|
20
19
|
|
21
|
-
if File.exists?(view_name) || File.exists?(view_name +
|
20
|
+
if File.exists?(view_name) || File.exists?(view_name + ".rb")
|
22
21
|
require view_name
|
23
|
-
elsif File.exists?(views_file +
|
22
|
+
elsif File.exists?(views_file + ".rb")
|
24
23
|
require views_file
|
25
24
|
else
|
26
25
|
msg = "[WARN] Can't find or require #{view_name.inspect} view."
|
@@ -31,18 +30,18 @@ module Assert
|
|
31
30
|
|
32
31
|
# setup options and their default values
|
33
32
|
|
34
|
-
option
|
35
|
-
option
|
36
|
-
option
|
37
|
-
option
|
38
|
-
option
|
39
|
-
option
|
33
|
+
option "styled", false
|
34
|
+
option "pass_styles" # none
|
35
|
+
option "fail_styles" # none
|
36
|
+
option "error_styles" # none
|
37
|
+
option "skip_styles" # none
|
38
|
+
option "ignore_styles" # none
|
40
39
|
|
41
|
-
option
|
42
|
-
option
|
43
|
-
option
|
44
|
-
option
|
45
|
-
option
|
40
|
+
option "pass_abbrev", "."
|
41
|
+
option "fail_abbrev", "F"
|
42
|
+
option "ignore_abbrev", "I"
|
43
|
+
option "skip_abbrev", "S"
|
44
|
+
option "error_abbrev", "E"
|
46
45
|
|
47
46
|
attr_reader :config
|
48
47
|
|
@@ -92,7 +91,5 @@ module Assert
|
|
92
91
|
|
93
92
|
def puts(*args); @output_io.puts(*args); end
|
94
93
|
def print(*args); @output_io.print(*args); end
|
95
|
-
|
96
94
|
end
|
97
|
-
|
98
95
|
end
|
data/lib/assert/view_helpers.rb
CHANGED
@@ -1,9 +1,7 @@
|
|
1
|
-
require
|
1
|
+
require "assert/config_helpers"
|
2
2
|
|
3
3
|
module Assert
|
4
|
-
|
5
4
|
module ViewHelpers
|
6
|
-
|
7
5
|
def self.included(receiver)
|
8
6
|
receiver.class_eval do
|
9
7
|
include Assert::ConfigHelpers
|
@@ -13,7 +11,6 @@ module Assert
|
|
13
11
|
end
|
14
12
|
|
15
13
|
module ClassMethods
|
16
|
-
|
17
14
|
def option(name, *default_vals)
|
18
15
|
default = default_vals.size > 1 ? default_vals : default_vals.first
|
19
16
|
define_method(name) do |*args|
|
@@ -23,11 +20,9 @@ module Assert
|
|
23
20
|
(val = instance_variable_get("@#{name}")).nil? ? default : val
|
24
21
|
end
|
25
22
|
end
|
26
|
-
|
27
23
|
end
|
28
24
|
|
29
25
|
module InstanceMethods
|
30
|
-
|
31
26
|
# show any captured output
|
32
27
|
def captured_output(output)
|
33
28
|
"--- stdout ---\n"\
|
@@ -37,21 +32,21 @@ module Assert
|
|
37
32
|
|
38
33
|
# show any captured output
|
39
34
|
def re_run_test_cmd(test_id)
|
40
|
-
"assert -t #{test_id.gsub(Dir.pwd,
|
35
|
+
"assert -t #{test_id.gsub(Dir.pwd, ".")}"
|
41
36
|
end
|
42
37
|
|
43
38
|
def tests_to_run_count_statement
|
44
|
-
"#{self.tests_to_run_count} test#{
|
39
|
+
"#{self.tests_to_run_count} test#{"s" if self.tests_to_run_count != 1}"
|
45
40
|
end
|
46
41
|
|
47
42
|
def result_count_statement
|
48
|
-
"#{self.result_count} result#{
|
43
|
+
"#{self.result_count} result#{"s" if self.result_count != 1}"
|
49
44
|
end
|
50
45
|
|
51
46
|
# generate a comma-seperated sentence fragment given a list of items
|
52
47
|
def to_sentence(items)
|
53
48
|
if items.size <= 2
|
54
|
-
items.join(items.size == 2 ?
|
49
|
+
items.join(items.size == 2 ? " and " : "")
|
55
50
|
else
|
56
51
|
[items[0..-2].join(", "), items.last].join(", and ")
|
57
52
|
end
|
@@ -86,13 +81,10 @@ module Assert
|
|
86
81
|
end
|
87
82
|
self.to_sentence(summaries)
|
88
83
|
end
|
89
|
-
|
90
84
|
end
|
91
85
|
|
92
86
|
module Ansi
|
93
|
-
|
94
87
|
# Table of supported styles/codes (http://en.wikipedia.org/wiki/ANSI_escape_code)
|
95
|
-
|
96
88
|
CODES = {
|
97
89
|
:clear => 0,
|
98
90
|
:reset => 0,
|
@@ -173,7 +165,7 @@ module Assert
|
|
173
165
|
}
|
174
166
|
|
175
167
|
def self.code_for(*style_names)
|
176
|
-
style_names.map{ |n| "\e[#{CODES[n]}m" if CODES.key?(n) }.compact.join(
|
168
|
+
style_names.map{ |n| "\e[#{CODES[n]}m" if CODES.key?(n) }.compact.join("")
|
177
169
|
end
|
178
170
|
|
179
171
|
def ansi_styled_msg(msg, result_type)
|
@@ -182,9 +174,6 @@ module Assert
|
|
182
174
|
return msg if code.empty?
|
183
175
|
code + msg + Assert::ViewHelpers::Ansi.code_for(:reset)
|
184
176
|
end
|
185
|
-
|
186
177
|
end
|
187
|
-
|
188
178
|
end
|
189
|
-
|
190
179
|
end
|
data/log/{.gitkeep → .keep}
RENAMED
File without changes
|
data/test/helper.rb
CHANGED
@@ -6,54 +6,39 @@ ROOT_PATH = File.expand_path("../..", __FILE__)
|
|
6
6
|
$LOAD_PATH.unshift(ROOT_PATH)
|
7
7
|
|
8
8
|
# require pry for debugging (`binding.pry`)
|
9
|
-
require
|
10
|
-
require
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
class Assert::Test
|
22
|
-
|
23
|
-
module TestHelpers
|
24
|
-
|
25
|
-
def self.included(receiver)
|
26
|
-
receiver.class_eval do
|
27
|
-
setup do
|
28
|
-
@test_run_results = []
|
29
|
-
@run_callback = proc{ |result| @test_run_results << result }
|
30
|
-
end
|
9
|
+
require "pry"
|
10
|
+
require "test/support/factory"
|
11
|
+
|
12
|
+
module Assert::Test::TestHelpers
|
13
|
+
def self.included(receiver)
|
14
|
+
receiver.class_eval do
|
15
|
+
setup do
|
16
|
+
@test_run_results = []
|
17
|
+
@run_callback = proc { |result| @test_run_results << result }
|
31
18
|
end
|
19
|
+
end
|
32
20
|
|
33
|
-
|
34
|
-
|
35
|
-
def test_run_callback
|
36
|
-
@run_callback
|
37
|
-
end
|
21
|
+
private
|
38
22
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
end
|
23
|
+
def test_run_callback
|
24
|
+
@run_callback
|
25
|
+
end
|
43
26
|
|
44
|
-
|
45
|
-
|
46
|
-
|
27
|
+
def test_run_results(type = nil)
|
28
|
+
return @test_run_results if type.nil?
|
29
|
+
@test_run_results.select{ |r| r.type == type }
|
30
|
+
end
|
47
31
|
|
48
|
-
|
49
|
-
|
50
|
-
|
32
|
+
def test_run_result_count(type = nil)
|
33
|
+
test_run_results(type).count
|
34
|
+
end
|
51
35
|
|
52
|
-
|
53
|
-
|
54
|
-
end
|
36
|
+
def test_run_result_messages
|
37
|
+
@test_run_results.map(&:message)
|
55
38
|
end
|
56
39
|
|
40
|
+
def last_test_run_result
|
41
|
+
@test_run_results.last
|
42
|
+
end
|
57
43
|
end
|
58
|
-
|
59
44
|
end
|