assert 2.19.1 → 2.19.6
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 +4 -4
- data/assert.gemspec +10 -7
- data/lib/assert.rb +18 -6
- data/lib/assert/actual_value.rb +8 -6
- data/lib/assert/assert_runner.rb +36 -17
- data/lib/assert/assertions.rb +83 -50
- data/lib/assert/cli.rb +30 -70
- data/lib/assert/clirb.rb +55 -0
- data/lib/assert/config.rb +20 -8
- data/lib/assert/config_helpers.rb +55 -22
- data/lib/assert/context.rb +14 -18
- data/lib/assert/context/let_dsl.rb +5 -2
- data/lib/assert/context/setup_dsl.rb +21 -16
- data/lib/assert/context/subject_dsl.rb +6 -7
- data/lib/assert/context/suite_dsl.rb +2 -1
- data/lib/assert/context/test_dsl.rb +55 -19
- data/lib/assert/default_suite.rb +25 -15
- data/lib/assert/default_view.rb +47 -30
- data/lib/assert/file_line.rb +6 -6
- data/lib/assert/macro.rb +1 -1
- data/lib/assert/macros/methods.rb +71 -45
- data/lib/assert/result.rb +111 -62
- data/lib/assert/runner.rb +68 -51
- data/lib/assert/stub.rb +42 -3
- data/lib/assert/suite.rb +67 -28
- data/lib/assert/test.rb +40 -35
- data/lib/assert/utils.rb +19 -10
- data/lib/assert/version.rb +1 -1
- data/lib/assert/view.rb +44 -18
- data/lib/assert/view_helpers.rb +100 -92
- data/test/helper.rb +3 -1
- data/test/support/factory.rb +38 -21
- data/test/system/stub_tests.rb +180 -144
- data/test/system/test_tests.rb +86 -60
- data/test/unit/actual_value_tests.rb +69 -50
- data/test/unit/assert_tests.rb +39 -22
- data/test/unit/assertions/assert_block_tests.rb +10 -10
- data/test/unit/assertions/assert_changes_tests.rb +25 -21
- data/test/unit/assertions/assert_empty_tests.rb +14 -12
- data/test/unit/assertions/assert_equal_tests.rb +26 -26
- data/test/unit/assertions/assert_file_exists_tests.rb +15 -13
- data/test/unit/assertions/assert_includes_tests.rb +10 -10
- data/test/unit/assertions/assert_instance_of_tests.rb +14 -14
- data/test/unit/assertions/assert_is_a_tests.rb +128 -0
- data/test/unit/assertions/assert_match_tests.rb +10 -10
- data/test/unit/assertions/assert_nil_tests.rb +16 -12
- data/test/unit/assertions/assert_raises_tests.rb +27 -20
- data/test/unit/assertions/assert_respond_to_tests.rb +10 -10
- data/test/unit/assertions/assert_same_tests.rb +24 -24
- data/test/unit/assertions/assert_true_false_tests.rb +32 -24
- data/test/unit/assertions_tests.rb +14 -9
- data/test/unit/config_helpers_tests.rb +15 -10
- data/test/unit/config_tests.rb +34 -9
- data/test/unit/context/setup_dsl_tests.rb +24 -14
- data/test/unit/context/subject_dsl_tests.rb +3 -3
- data/test/unit/context/suite_dsl_tests.rb +4 -4
- data/test/unit/context/test_dsl_tests.rb +37 -17
- data/test/unit/context_info_tests.rb +4 -4
- data/test/unit/context_tests.rb +110 -54
- data/test/unit/default_suite_tests.rb +10 -6
- data/test/unit/factory_tests.rb +2 -2
- data/test/unit/file_line_tests.rb +7 -7
- data/test/unit/macro_tests.rb +11 -11
- data/test/unit/result_tests.rb +47 -41
- data/test/unit/runner_tests.rb +29 -16
- data/test/unit/suite_tests.rb +37 -15
- data/test/unit/test_tests.rb +63 -50
- data/test/unit/utils_tests.rb +48 -35
- data/test/unit/view_helpers_tests.rb +21 -14
- data/test/unit/view_tests.rb +5 -5
- metadata +26 -11
- data/test/unit/assertions/assert_kind_of_tests.rb +0 -68
data/lib/assert/utils.rb
CHANGED
@@ -12,18 +12,21 @@ module Assert
|
|
12
12
|
out
|
13
13
|
end
|
14
14
|
|
15
|
-
# show objects in a human-readable manner and make the output diff-able.
|
16
|
-
# expands on the basic `show` util by escaping newlines and making
|
17
|
-
# hex-values generic.
|
15
|
+
# show objects in a human-readable manner and make the output diff-able.
|
16
|
+
# This expands on the basic `show` util by escaping newlines and making
|
17
|
+
# object id hex-values generic.
|
18
18
|
def self.show_for_diff(obj, config)
|
19
|
-
show(obj, config)
|
19
|
+
show(obj, config)
|
20
|
+
.gsub(/\\n/, "\n")
|
21
|
+
.gsub(/:0x[a-fA-F0-9]{4,}/m, ":0xXXXXXX")
|
20
22
|
end
|
21
23
|
|
22
24
|
# open a tempfile and yield it
|
23
25
|
def self.tempfile(name, content)
|
24
26
|
require "tempfile"
|
25
27
|
Tempfile.open(name) do |tmpfile|
|
26
|
-
tmpfile.puts(content)
|
28
|
+
tmpfile.puts(content)
|
29
|
+
tmpfile.flush
|
27
30
|
yield tmpfile if block_given?
|
28
31
|
end
|
29
32
|
end
|
@@ -34,7 +37,8 @@ module Assert
|
|
34
37
|
Proc.new{ |obj| PP.pp(obj, +"", width || 79).strip }
|
35
38
|
end
|
36
39
|
|
37
|
-
# Return true if if either show output has newlines or is bigger than 29
|
40
|
+
# Return true if if either show output has newlines or is bigger than 29
|
41
|
+
# chars.
|
38
42
|
def self.default_use_diff_proc
|
39
43
|
Proc.new do |exp_show_output, act_show_output|
|
40
44
|
exp_show_output.include?("\n") || exp_show_output.size > 29 ||
|
@@ -62,10 +66,15 @@ module Assert
|
|
62
66
|
def self.git_changed_proc
|
63
67
|
Proc.new do |config, test_paths|
|
64
68
|
files = []
|
65
|
-
cmd =
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
+
cmd =
|
70
|
+
[
|
71
|
+
# changed files
|
72
|
+
"git diff --no-ext-diff --name-only #{config.changed_ref}",
|
73
|
+
# added files
|
74
|
+
"git ls-files --others --exclude-standard",
|
75
|
+
]
|
76
|
+
.map{ |c| "#{c} -- #{test_paths.join(" ")}" }
|
77
|
+
.join(" && ")
|
69
78
|
Assert::CLI.bench("Load only changed files") do
|
70
79
|
files = `#{cmd}`.split("\n")
|
71
80
|
end
|
data/lib/assert/version.rb
CHANGED
data/lib/assert/view.rb
CHANGED
@@ -16,16 +16,18 @@ module Assert
|
|
16
16
|
|
17
17
|
def self.require_user_view(view_name)
|
18
18
|
views_file = File.expand_path(
|
19
|
-
File.join("#{ENV["HOME"]}/.assert/views", view_name, "lib", view_name)
|
19
|
+
File.join("#{ENV["HOME"]}/.assert/views", view_name, "lib", view_name),
|
20
20
|
)
|
21
21
|
|
22
|
-
if File.
|
22
|
+
if File.exist?(view_name) || File.exist?(view_name + ".rb")
|
23
23
|
require view_name
|
24
|
-
elsif File.
|
24
|
+
elsif File.exist?(views_file + ".rb")
|
25
25
|
require views_file
|
26
26
|
else
|
27
|
-
msg = "[WARN] Can't find or require #{view_name.inspect} view."
|
28
|
-
|
27
|
+
msg = +"[WARN] Can't find or require #{view_name.inspect} view."
|
28
|
+
unless view_name.match(%r{\A/})
|
29
|
+
msg << " Did you install it in `~/.assert/views`?"
|
30
|
+
end
|
29
31
|
warn msg
|
30
32
|
end
|
31
33
|
end
|
@@ -48,11 +50,13 @@ module Assert
|
|
48
50
|
attr_reader :config
|
49
51
|
|
50
52
|
def initialize(config, output_io)
|
51
|
-
@config
|
53
|
+
@config, @output_io, = config, output_io
|
52
54
|
@output_io.sync = true if @output_io.respond_to?(:sync=)
|
53
55
|
end
|
54
56
|
|
55
|
-
def view
|
57
|
+
def view
|
58
|
+
self
|
59
|
+
end
|
56
60
|
|
57
61
|
def is_tty?
|
58
62
|
!!@output_io.isatty
|
@@ -79,19 +83,41 @@ module Assert
|
|
79
83
|
# the test suite
|
80
84
|
# * `on_interrupt`: called when the test suite is interrupted while running
|
81
85
|
# the interrupt exception is passed as an arg
|
82
|
-
def before_load(test_files)
|
83
|
-
|
84
|
-
|
85
|
-
def
|
86
|
-
|
87
|
-
|
88
|
-
def
|
89
|
-
|
90
|
-
|
86
|
+
def before_load(test_files)
|
87
|
+
end
|
88
|
+
|
89
|
+
def after_load
|
90
|
+
end
|
91
|
+
|
92
|
+
def on_start
|
93
|
+
end
|
94
|
+
|
95
|
+
def before_test(test)
|
96
|
+
end
|
97
|
+
|
98
|
+
def on_result(result)
|
99
|
+
end
|
100
|
+
|
101
|
+
def after_test(test)
|
102
|
+
end
|
103
|
+
|
104
|
+
def on_finish
|
105
|
+
end
|
106
|
+
|
107
|
+
def on_info(test)
|
108
|
+
end
|
109
|
+
|
110
|
+
def on_interrupt(err)
|
111
|
+
end
|
91
112
|
|
92
113
|
# IO capture
|
93
114
|
|
94
|
-
def puts(*args)
|
95
|
-
|
115
|
+
def puts(*args)
|
116
|
+
@output_io.puts(*args)
|
117
|
+
end
|
118
|
+
|
119
|
+
def print(*args)
|
120
|
+
@output_io.print(*args)
|
121
|
+
end
|
96
122
|
end
|
97
123
|
end
|
data/lib/assert/view_helpers.rb
CHANGED
@@ -16,7 +16,7 @@ module Assert
|
|
16
16
|
def option(name, *default_vals)
|
17
17
|
default = default_vals.size > 1 ? default_vals : default_vals.first
|
18
18
|
define_method(name) do |*args|
|
19
|
-
|
19
|
+
unless (value = args.size > 1 ? args : args.first).nil?
|
20
20
|
instance_variable_set("@#{name}", value)
|
21
21
|
end
|
22
22
|
(val = instance_variable_get("@#{name}")).nil? ? default : val
|
@@ -38,11 +38,11 @@ module Assert
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def tests_to_run_count_statement
|
41
|
-
"#{
|
41
|
+
"#{tests_to_run_count} test#{"s" if tests_to_run_count != 1}"
|
42
42
|
end
|
43
43
|
|
44
44
|
def result_count_statement
|
45
|
-
"#{
|
45
|
+
"#{result_count} result#{"s" if result_count != 1}"
|
46
46
|
end
|
47
47
|
|
48
48
|
# generate a comma-seperated sentence fragment given a list of items
|
@@ -56,9 +56,9 @@ module Assert
|
|
56
56
|
|
57
57
|
# generate an appropriate result summary msg for all tests passing
|
58
58
|
def all_pass_result_summary_msg
|
59
|
-
if
|
59
|
+
if result_count < 1
|
60
60
|
"uhh..."
|
61
|
-
elsif
|
61
|
+
elsif result_count == 1
|
62
62
|
"pass"
|
63
63
|
else
|
64
64
|
"all pass"
|
@@ -67,112 +67,120 @@ module Assert
|
|
67
67
|
|
68
68
|
# print a result summary message for a given result type
|
69
69
|
def result_summary_msg(result_type)
|
70
|
-
if result_type == :pass &&
|
71
|
-
|
70
|
+
if result_type == :pass && all_pass?
|
71
|
+
all_pass_result_summary_msg
|
72
72
|
else
|
73
|
-
"#{
|
73
|
+
"#{send("#{result_type}_result_count")} #{result_type}"
|
74
74
|
end
|
75
75
|
end
|
76
76
|
|
77
77
|
# generate a sentence fragment describing the breakdown of test results
|
78
|
-
# if a block is given, yield each msg in the breakdown for custom
|
78
|
+
# if a block is given, yield each msg in the breakdown for custom
|
79
|
+
# formatting.
|
79
80
|
def results_summary_sentence
|
80
|
-
summaries =
|
81
|
-
summary_msg =
|
81
|
+
summaries = ocurring_result_types.map do |result_type|
|
82
|
+
summary_msg = result_summary_msg(result_type)
|
82
83
|
block_given? ? yield(summary_msg, result_type) : summary_msg
|
83
84
|
end
|
84
|
-
|
85
|
+
to_sentence(summaries)
|
85
86
|
end
|
86
87
|
end
|
87
88
|
|
88
89
|
module Ansi
|
89
|
-
# Table of supported styles/codes
|
90
|
+
# Table of supported styles/codes
|
91
|
+
# (http://en.wikipedia.org/wiki/ANSI_escape_code).
|
90
92
|
CODES = {
|
91
|
-
:
|
92
|
-
:
|
93
|
-
:
|
94
|
-
:
|
95
|
-
:
|
96
|
-
:
|
97
|
-
:
|
98
|
-
:
|
99
|
-
:
|
100
|
-
:
|
101
|
-
:
|
102
|
-
:
|
103
|
-
:
|
104
|
-
:
|
105
|
-
:
|
106
|
-
:
|
107
|
-
:
|
108
|
-
:
|
109
|
-
:
|
110
|
-
:
|
111
|
-
:
|
112
|
-
:
|
113
|
-
|
114
|
-
:
|
115
|
-
:
|
116
|
-
:
|
117
|
-
:
|
118
|
-
:
|
119
|
-
:
|
120
|
-
:
|
121
|
-
:
|
122
|
-
:
|
123
|
-
:
|
124
|
-
:
|
125
|
-
:
|
126
|
-
:
|
127
|
-
:
|
128
|
-
:
|
129
|
-
:
|
130
|
-
:
|
131
|
-
:
|
132
|
-
:
|
133
|
-
:
|
134
|
-
:
|
135
|
-
:
|
136
|
-
:
|
137
|
-
:
|
138
|
-
:
|
139
|
-
:
|
140
|
-
:
|
141
|
-
:
|
142
|
-
|
143
|
-
:
|
144
|
-
:
|
145
|
-
:
|
146
|
-
:
|
147
|
-
:
|
148
|
-
:
|
149
|
-
:
|
150
|
-
:
|
151
|
-
|
152
|
-
:
|
153
|
-
:
|
154
|
-
:
|
155
|
-
:
|
156
|
-
:
|
157
|
-
:
|
158
|
-
:
|
159
|
-
:
|
160
|
-
|
161
|
-
:
|
162
|
-
:
|
163
|
-
:
|
164
|
-
:
|
165
|
-
:
|
166
|
-
:
|
93
|
+
clear: 0,
|
94
|
+
reset: 0,
|
95
|
+
bright: 1,
|
96
|
+
bold: 1,
|
97
|
+
faint: 2,
|
98
|
+
dark: 2,
|
99
|
+
italic: 3,
|
100
|
+
underline: 4,
|
101
|
+
underscore: 4,
|
102
|
+
blink: 5,
|
103
|
+
slow_blink: 5,
|
104
|
+
rapid: 6,
|
105
|
+
rapid_blink: 6,
|
106
|
+
invert: 7,
|
107
|
+
inverse: 7,
|
108
|
+
reverse: 7,
|
109
|
+
negative: 7,
|
110
|
+
swap: 7,
|
111
|
+
conceal: 8,
|
112
|
+
concealed: 8,
|
113
|
+
hide: 9,
|
114
|
+
strike: 9,
|
115
|
+
|
116
|
+
default_font: 10,
|
117
|
+
font_default: 10,
|
118
|
+
font0: 10,
|
119
|
+
font1: 11,
|
120
|
+
font2: 12,
|
121
|
+
font3: 13,
|
122
|
+
font4: 14,
|
123
|
+
font5: 15,
|
124
|
+
font6: 16,
|
125
|
+
font7: 17,
|
126
|
+
font8: 18,
|
127
|
+
font9: 19,
|
128
|
+
fraktur: 20,
|
129
|
+
bright_off: 21,
|
130
|
+
bold_off: 21,
|
131
|
+
double_underline: 21,
|
132
|
+
clean: 22,
|
133
|
+
italic_off: 23,
|
134
|
+
fraktur_off: 23,
|
135
|
+
underline_off: 24,
|
136
|
+
blink_off: 25,
|
137
|
+
inverse_off: 26,
|
138
|
+
positive: 26,
|
139
|
+
conceal_off: 27,
|
140
|
+
show: 27,
|
141
|
+
reveal: 27,
|
142
|
+
crossed_off: 29,
|
143
|
+
crossed_out_off: 29,
|
144
|
+
|
145
|
+
black: 30,
|
146
|
+
red: 31,
|
147
|
+
green: 32,
|
148
|
+
yellow: 33,
|
149
|
+
blue: 34,
|
150
|
+
magenta: 35,
|
151
|
+
cyan: 36,
|
152
|
+
white: 37,
|
153
|
+
|
154
|
+
on_black: 40,
|
155
|
+
on_red: 41,
|
156
|
+
on_green: 42,
|
157
|
+
on_yellow: 43,
|
158
|
+
on_blue: 44,
|
159
|
+
on_magenta: 45,
|
160
|
+
on_cyan: 46,
|
161
|
+
on_white: 47,
|
162
|
+
|
163
|
+
frame: 51,
|
164
|
+
encircle: 52,
|
165
|
+
overline: 53,
|
166
|
+
frame_off: 54,
|
167
|
+
encircle_off: 54,
|
168
|
+
overline_off: 55,
|
167
169
|
}
|
168
170
|
|
169
171
|
def self.code_for(*style_names)
|
170
|
-
style_names
|
172
|
+
style_names
|
173
|
+
.map{ |n| "\e[#{CODES[n]}m" if CODES.key?(n) }
|
174
|
+
.compact
|
175
|
+
.join("")
|
171
176
|
end
|
172
177
|
|
173
178
|
def ansi_styled_msg(msg, result_type)
|
174
|
-
return msg if !
|
175
|
-
code =
|
179
|
+
return msg if !is_tty? || !styled
|
180
|
+
code =
|
181
|
+
Assert::ViewHelpers::Ansi.code_for(
|
182
|
+
*send("#{result_type}_styles"),
|
183
|
+
)
|
176
184
|
return msg if code.empty?
|
177
185
|
code + msg + Assert::ViewHelpers::Ansi.code_for(:reset)
|
178
186
|
end
|
data/test/helper.rb
CHANGED
@@ -16,12 +16,13 @@ module Assert::Test::TestHelpers
|
|
16
16
|
receiver.class_eval do
|
17
17
|
setup do
|
18
18
|
@test_run_results = []
|
19
|
-
@run_callback = proc
|
19
|
+
@run_callback = proc{ |result| @test_run_results << result }
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
23
|
private
|
24
24
|
|
25
|
+
# rubocop:disable Lint/NestedMethodDefinition
|
25
26
|
def test_run_callback
|
26
27
|
@run_callback
|
27
28
|
end
|
@@ -42,5 +43,6 @@ module Assert::Test::TestHelpers
|
|
42
43
|
def last_test_run_result
|
43
44
|
@test_run_results.last
|
44
45
|
end
|
46
|
+
# rubocop:enable Lint/NestedMethodDefinition
|
45
47
|
end
|
46
48
|
end
|
data/test/support/factory.rb
CHANGED
@@ -10,11 +10,17 @@ module Factory
|
|
10
10
|
extend Assert::Factory
|
11
11
|
|
12
12
|
def self.context_info_called_from
|
13
|
-
File.expand_path(
|
13
|
+
File.expand_path(
|
14
|
+
"#{Factory.path}_tests.rb:#{Factory.integer}",
|
15
|
+
Dir.pwd,
|
16
|
+
)
|
14
17
|
end
|
15
18
|
|
16
19
|
def self.context_info(context_klass = nil)
|
17
|
-
Assert::ContextInfo.new(
|
20
|
+
Assert::ContextInfo.new(
|
21
|
+
context_klass || context_class,
|
22
|
+
context_info_called_from,
|
23
|
+
)
|
18
24
|
end
|
19
25
|
|
20
26
|
# Generate an anonymous `Context` inherited from `Assert::Context` by default.
|
@@ -24,9 +30,8 @@ module Factory
|
|
24
30
|
klass = Class.new(inherit_from || Assert::Context, &block)
|
25
31
|
default = const_name = "FactoryAssertContext"
|
26
32
|
|
27
|
-
|
28
|
-
|
29
|
-
end
|
33
|
+
const_name =
|
34
|
+
"#{default}#{rand(Time.now.to_i)}" while Object.const_defined?(const_name)
|
30
35
|
Object.const_set(const_name, klass)
|
31
36
|
klass
|
32
37
|
end
|
@@ -35,9 +40,9 @@ module Factory
|
|
35
40
|
|
36
41
|
def self.test(*args, &block)
|
37
42
|
config, context_info, name = [
|
38
|
-
args.last.
|
39
|
-
args.last.
|
40
|
-
args.last.
|
43
|
+
args.last.is_a?(Assert::Config) ? args.pop : modes_off_config,
|
44
|
+
args.last.is_a?(Assert::ContextInfo) ? args.pop : self.context_info,
|
45
|
+
args.last.is_a?(::String) ? args.pop : "a test",
|
41
46
|
]
|
42
47
|
Assert::Test.for_block(name, context_info, config, &block)
|
43
48
|
end
|
@@ -45,15 +50,27 @@ module Factory
|
|
45
50
|
# Generate results for use in testing.
|
46
51
|
|
47
52
|
def self.pass_result(msg = nil)
|
48
|
-
Assert::Result::Pass.for_test(
|
53
|
+
Assert::Result::Pass.for_test(
|
54
|
+
Factory.test(Factory.string),
|
55
|
+
msg || Factory.string,
|
56
|
+
[],
|
57
|
+
)
|
49
58
|
end
|
50
59
|
|
51
60
|
def self.ignore_result(msg = nil)
|
52
|
-
Assert::Result::Ignore.for_test(
|
61
|
+
Assert::Result::Ignore.for_test(
|
62
|
+
Factory.test(Factory.string),
|
63
|
+
msg || Factory.string,
|
64
|
+
[],
|
65
|
+
)
|
53
66
|
end
|
54
67
|
|
55
68
|
def self.fail_result(msg = nil)
|
56
|
-
Assert::Result::Fail.for_test(
|
69
|
+
Assert::Result::Fail.for_test(
|
70
|
+
Factory.test(Factory.string),
|
71
|
+
msg || Factory.string,
|
72
|
+
[],
|
73
|
+
)
|
57
74
|
end
|
58
75
|
|
59
76
|
def self.skip_result(exception = nil)
|
@@ -68,23 +85,23 @@ module Factory
|
|
68
85
|
|
69
86
|
def self.modes_off_config
|
70
87
|
Assert::Config.new({
|
71
|
-
:
|
72
|
-
:
|
73
|
-
:
|
74
|
-
:
|
75
|
-
:
|
88
|
+
capture_output: false,
|
89
|
+
halt_on_fail: false,
|
90
|
+
changed_only: false,
|
91
|
+
pp_objects: false,
|
92
|
+
debug: false,
|
76
93
|
})
|
77
94
|
end
|
78
95
|
|
79
96
|
def self.modes_off_suite
|
80
|
-
Assert::DefaultSuite.new(
|
97
|
+
Assert::DefaultSuite.new(modes_off_config)
|
81
98
|
end
|
82
99
|
|
83
100
|
def self.modes_off_context_class(*args, &block)
|
84
|
-
suite_obj =
|
85
|
-
|
101
|
+
suite_obj = modes_off_suite
|
102
|
+
context_class(*args) do
|
86
103
|
suite(suite_obj)
|
87
|
-
instance_eval(&block)
|
104
|
+
instance_eval(&block) unless block.nil?
|
88
105
|
end
|
89
106
|
end
|
90
107
|
|
@@ -93,7 +110,7 @@ module Factory
|
|
93
110
|
Factory.modes_off_context_class.new(
|
94
111
|
test,
|
95
112
|
test.config,
|
96
|
-
result_block || proc
|
113
|
+
result_block || proc{ |r| },
|
97
114
|
)
|
98
115
|
end
|
99
116
|
|