assert 2.19.0 → 2.19.5
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/Gemfile +4 -2
- data/assert.gemspec +11 -6
- data/bin/assert +1 -0
- data/lib/assert.rb +20 -6
- data/lib/assert/actual_value.rb +11 -6
- data/lib/assert/assert_runner.rb +38 -17
- data/lib/assert/assertions.rb +85 -50
- data/lib/assert/cli.rb +32 -70
- data/lib/assert/clirb.rb +55 -0
- data/lib/assert/config.rb +22 -8
- data/lib/assert/config_helpers.rb +57 -22
- data/lib/assert/context.rb +16 -18
- data/lib/assert/context/let_dsl.rb +8 -2
- data/lib/assert/context/method_missing.rb +3 -0
- data/lib/assert/context/setup_dsl.rb +24 -16
- data/lib/assert/context/subject_dsl.rb +9 -7
- data/lib/assert/context/suite_dsl.rb +5 -1
- data/lib/assert/context/test_dsl.rb +58 -19
- data/lib/assert/context_info.rb +2 -0
- data/lib/assert/default_runner.rb +2 -0
- data/lib/assert/default_suite.rb +27 -15
- data/lib/assert/default_view.rb +49 -30
- data/lib/assert/factory.rb +2 -0
- data/lib/assert/file_line.rb +8 -6
- data/lib/assert/macro.rb +3 -1
- data/lib/assert/macros/methods.rb +73 -45
- data/lib/assert/result.rb +114 -62
- data/lib/assert/runner.rb +70 -51
- data/lib/assert/stub.rb +44 -3
- data/lib/assert/suite.rb +69 -28
- data/lib/assert/test.rb +43 -36
- data/lib/assert/utils.rb +22 -11
- data/lib/assert/version.rb +3 -1
- data/lib/assert/view.rb +46 -18
- data/lib/assert/view_helpers.rb +102 -92
- data/test/helper.rb +8 -4
- data/test/support/factory.rb +40 -21
- data/test/support/inherited_stuff.rb +2 -0
- data/test/system/stub_tests.rb +182 -144
- data/test/system/test_tests.rb +88 -60
- data/test/unit/actual_value_tests.rb +71 -50
- data/test/unit/assert_tests.rb +42 -23
- data/test/unit/assertions/assert_block_tests.rb +12 -10
- data/test/unit/assertions/assert_changes_tests.rb +27 -21
- data/test/unit/assertions/assert_empty_tests.rb +16 -12
- data/test/unit/assertions/assert_equal_tests.rb +28 -26
- data/test/unit/assertions/assert_file_exists_tests.rb +17 -13
- data/test/unit/assertions/assert_includes_tests.rb +12 -10
- data/test/unit/assertions/assert_instance_of_tests.rb +16 -14
- data/test/unit/assertions/assert_is_a_tests.rb +128 -0
- data/test/unit/assertions/assert_match_tests.rb +12 -10
- data/test/unit/assertions/assert_nil_tests.rb +18 -12
- data/test/unit/assertions/assert_raises_tests.rb +29 -20
- data/test/unit/assertions/assert_respond_to_tests.rb +12 -10
- data/test/unit/assertions/assert_same_tests.rb +26 -24
- data/test/unit/assertions/assert_true_false_tests.rb +34 -24
- data/test/unit/assertions_tests.rb +16 -9
- data/test/unit/config_helpers_tests.rb +17 -10
- data/test/unit/config_tests.rb +36 -9
- data/test/unit/context/let_dsl_tests.rb +2 -0
- data/test/unit/context/setup_dsl_tests.rb +26 -14
- data/test/unit/context/subject_dsl_tests.rb +5 -3
- data/test/unit/context/suite_dsl_tests.rb +6 -4
- data/test/unit/context/test_dsl_tests.rb +39 -17
- data/test/unit/context_info_tests.rb +6 -4
- data/test/unit/context_tests.rb +112 -54
- data/test/unit/default_runner_tests.rb +2 -0
- data/test/unit/default_suite_tests.rb +12 -6
- data/test/unit/factory_tests.rb +4 -2
- data/test/unit/file_line_tests.rb +9 -7
- data/test/unit/macro_tests.rb +13 -11
- data/test/unit/result_tests.rb +49 -41
- data/test/unit/runner_tests.rb +33 -18
- data/test/unit/suite_tests.rb +39 -15
- data/test/unit/test_tests.rb +65 -50
- data/test/unit/utils_tests.rb +52 -37
- data/test/unit/view_helpers_tests.rb +23 -14
- data/test/unit/view_tests.rb +7 -5
- metadata +26 -11
- data/test/unit/assertions/assert_kind_of_tests.rb +0 -66
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require "assert"
|
2
4
|
require "assert/assertions"
|
3
5
|
|
@@ -6,18 +8,18 @@ module Assert::Assertions
|
|
6
8
|
include Assert::Test::TestHelpers
|
7
9
|
|
8
10
|
desc "`assert_raises`"
|
9
|
-
subject
|
11
|
+
subject do
|
10
12
|
desc = desc1
|
11
13
|
Factory.test do
|
12
|
-
assert_raises(StandardError, RuntimeError)
|
13
|
-
assert_raises(StandardError, RuntimeError, desc)
|
14
|
-
assert_raises(RuntimeError, desc)
|
15
|
-
assert_raises(RuntimeError, desc)
|
16
|
-
assert_raises(desc)
|
14
|
+
assert_raises(StandardError, RuntimeError){ raise(StandardError) }
|
15
|
+
assert_raises(StandardError, RuntimeError, desc){ raise(Exception) }
|
16
|
+
assert_raises(RuntimeError, desc){ raise(StandardError) }
|
17
|
+
assert_raises(RuntimeError, desc){ true }
|
18
|
+
assert_raises(desc){ true }
|
17
19
|
end
|
18
|
-
|
20
|
+
end
|
19
21
|
|
20
|
-
let(:desc1)
|
22
|
+
let(:desc1){ "assert raises fail desc" }
|
21
23
|
|
22
24
|
should "produce results as expected" do
|
23
25
|
subject.run(&test_run_callback)
|
@@ -34,7 +36,9 @@ module Assert::Assertions
|
|
34
36
|
"#{desc1}\nAn exception expected but nothing raised.",
|
35
37
|
]
|
36
38
|
messages = test_run_results(:fail).map(&:message)
|
37
|
-
messages.each_with_index
|
39
|
+
messages.each_with_index do |msg, n|
|
40
|
+
assert_that(msg).matches(/^#{exp[n]}/)
|
41
|
+
end
|
38
42
|
end
|
39
43
|
|
40
44
|
should "return any raised exception instance" do
|
@@ -43,7 +47,7 @@ module Assert::Assertions
|
|
43
47
|
|
44
48
|
test =
|
45
49
|
Factory.test do
|
46
|
-
error = assert_raises(RuntimeError)
|
50
|
+
error = assert_raises(RuntimeError){ raise(error_msg) }
|
47
51
|
end
|
48
52
|
test.run
|
49
53
|
|
@@ -51,7 +55,7 @@ module Assert::Assertions
|
|
51
55
|
assert_that(error).is_kind_of(RuntimeError)
|
52
56
|
assert_that(error.message).equals(error_msg)
|
53
57
|
|
54
|
-
test = Factory.test
|
58
|
+
test = Factory.test{ error = assert_raises(RuntimeError){} }
|
55
59
|
test.run
|
56
60
|
|
57
61
|
assert_that(error).is_nil
|
@@ -62,17 +66,19 @@ module Assert::Assertions
|
|
62
66
|
include Assert::Test::TestHelpers
|
63
67
|
|
64
68
|
desc "`assert_nothing_raised`"
|
65
|
-
subject
|
69
|
+
subject do
|
66
70
|
desc = desc1
|
67
71
|
Factory.test do
|
68
|
-
assert_nothing_raised(StandardError, RuntimeError, desc)
|
69
|
-
|
70
|
-
|
71
|
-
assert_nothing_raised
|
72
|
+
assert_nothing_raised(StandardError, RuntimeError, desc) do
|
73
|
+
raise(StandardError)
|
74
|
+
end
|
75
|
+
assert_nothing_raised(RuntimeError){ raise(StandardError) }
|
76
|
+
assert_nothing_raised(desc){ raise(RuntimeError) }
|
77
|
+
assert_nothing_raised{ true }
|
72
78
|
end
|
73
|
-
|
79
|
+
end
|
74
80
|
|
75
|
-
let(:desc1)
|
81
|
+
let(:desc1){ "assert nothing raised fail desc" }
|
76
82
|
|
77
83
|
should "produce results as expected" do
|
78
84
|
subject.run(&test_run_callback)
|
@@ -83,11 +89,14 @@ module Assert::Assertions
|
|
83
89
|
|
84
90
|
exp =
|
85
91
|
[
|
86
|
-
"#{desc1}\nStandardError or RuntimeError exception not expected,
|
92
|
+
"#{desc1}\nStandardError or RuntimeError exception not expected, "\
|
93
|
+
"but raised:",
|
87
94
|
"#{desc1}\nAn exception not expected, but raised:",
|
88
95
|
]
|
89
96
|
messages = test_run_results(:fail).map(&:message)
|
90
|
-
messages.each_with_index
|
97
|
+
messages.each_with_index do |msg, n|
|
98
|
+
assert_that(msg).matches(/^#{exp[n]}/)
|
99
|
+
end
|
91
100
|
end
|
92
101
|
end
|
93
102
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require "assert"
|
2
4
|
require "assert/assertions"
|
3
5
|
|
@@ -8,17 +10,17 @@ module Assert::Assertions
|
|
8
10
|
include Assert::Test::TestHelpers
|
9
11
|
|
10
12
|
desc "`assert_respond_to`"
|
11
|
-
subject
|
13
|
+
subject do
|
12
14
|
args = args1
|
13
15
|
Factory.test do
|
14
16
|
assert_respond_to(:abs, 1) # pass
|
15
17
|
assert_respond_to(*args) # fail
|
16
18
|
end
|
17
|
-
|
19
|
+
end
|
18
20
|
|
19
|
-
let(:desc1)
|
20
|
-
let(:args1)
|
21
|
-
let(:config1)
|
21
|
+
let(:desc1){ "assert respond to fail desc" }
|
22
|
+
let(:args1){ [:abs, "1", desc1] }
|
23
|
+
let(:config1){ subject.config }
|
22
24
|
|
23
25
|
should "produce results as expected" do
|
24
26
|
subject.run(&test_run_callback)
|
@@ -39,17 +41,17 @@ module Assert::Assertions
|
|
39
41
|
include Assert::Test::TestHelpers
|
40
42
|
|
41
43
|
desc "`assert_not_respond_to`"
|
42
|
-
subject
|
44
|
+
subject do
|
43
45
|
args = args1
|
44
46
|
Factory.test do
|
45
47
|
assert_not_respond_to(*args) # fail
|
46
48
|
assert_not_respond_to(:abs, "1") # pass
|
47
49
|
end
|
48
|
-
|
50
|
+
end
|
49
51
|
|
50
|
-
let(:desc1)
|
51
|
-
let(:args1)
|
52
|
-
let(:config1)
|
52
|
+
let(:desc1){ "assert not respond to fail desc" }
|
53
|
+
let(:args1){ [:abs, 1, desc1] }
|
54
|
+
let(:config1){ subject.config }
|
53
55
|
|
54
56
|
should "produce results as expected" do
|
55
57
|
subject.run(&test_run_callback)
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require "assert"
|
2
4
|
require "assert/assertions"
|
3
5
|
|
@@ -8,20 +10,20 @@ module Assert::Assertions
|
|
8
10
|
include Assert::Test::TestHelpers
|
9
11
|
|
10
12
|
desc "`assert_same`"
|
11
|
-
subject
|
13
|
+
subject do
|
12
14
|
args = args1
|
13
15
|
object = object1
|
14
16
|
Factory.test do
|
15
17
|
assert_same(object, object) # pass
|
16
18
|
assert_same(*args) # fail
|
17
19
|
end
|
18
|
-
|
20
|
+
end
|
19
21
|
|
20
|
-
let(:class1)
|
21
|
-
let(:object1)
|
22
|
-
let(:desc1)
|
23
|
-
let(:args1)
|
24
|
-
let(:config1)
|
22
|
+
let(:class1){ Class.new }
|
23
|
+
let(:object1){ class1.new }
|
24
|
+
let(:desc1){ "assert same fail desc" }
|
25
|
+
let(:args1){ [object1, class1.new, desc1] }
|
26
|
+
let(:config1){ subject.config }
|
25
27
|
|
26
28
|
should "produce results as expected" do
|
27
29
|
subject.run(&test_run_callback)
|
@@ -44,7 +46,7 @@ module Assert::Assertions
|
|
44
46
|
include Assert::Test::TestHelpers
|
45
47
|
|
46
48
|
desc "`assert_not_same`"
|
47
|
-
subject
|
49
|
+
subject do
|
48
50
|
args = args1
|
49
51
|
object = object1
|
50
52
|
klass = class1
|
@@ -52,13 +54,13 @@ module Assert::Assertions
|
|
52
54
|
assert_not_same(*args) # fail
|
53
55
|
assert_not_same(object, klass.new) # pass
|
54
56
|
end
|
55
|
-
|
57
|
+
end
|
56
58
|
|
57
|
-
let(:class1)
|
58
|
-
let(:object1)
|
59
|
-
let(:desc1)
|
60
|
-
let(:args1)
|
61
|
-
let(:config1)
|
59
|
+
let(:class1){ Class.new }
|
60
|
+
let(:object1){ class1.new }
|
61
|
+
let(:desc1){ "assert not same fail desc" }
|
62
|
+
let(:args1){ [object1, object1, desc1] }
|
63
|
+
let(:config1){ subject.config }
|
62
64
|
|
63
65
|
should "produce results as expected" do
|
64
66
|
subject.run(&test_run_callback)
|
@@ -81,27 +83,27 @@ module Assert::Assertions
|
|
81
83
|
include Assert::Test::TestHelpers
|
82
84
|
|
83
85
|
desc "with objects that should use diff when showing"
|
84
|
-
let(:config1)
|
86
|
+
let(:config1) do
|
85
87
|
Factory.modes_off_config.tap do |config|
|
86
88
|
config.use_diff_proc(Assert::U.default_use_diff_proc)
|
87
89
|
config.run_diff_proc(Assert::U.syscmd_diff_proc)
|
88
90
|
end
|
89
|
-
|
91
|
+
end
|
90
92
|
|
91
|
-
let(:exp_obj1)
|
92
|
-
let(:act_obj1)
|
93
|
-
let(:exp_obj_show1)
|
94
|
-
let(:act_obj_show1)
|
93
|
+
let(:exp_obj1){ "I'm a\nstring" }
|
94
|
+
let(:act_obj1){ "I am a \nstring" }
|
95
|
+
let(:exp_obj_show1){ Assert::U.show_for_diff(exp_obj1, config1) }
|
96
|
+
let(:act_obj_show1){ Assert::U.show_for_diff(act_obj1, config1) }
|
95
97
|
end
|
96
98
|
|
97
99
|
class AssertSameDiffTests < DiffTests
|
98
100
|
desc "`assert_same`"
|
99
|
-
subject
|
101
|
+
subject do
|
100
102
|
exp_obj, act_obj = exp_obj1, act_obj1
|
101
103
|
Factory.test(config1) do
|
102
104
|
assert_same(exp_obj, act_obj)
|
103
105
|
end
|
104
|
-
|
106
|
+
end
|
105
107
|
|
106
108
|
should "include diff output in the fail messages" do
|
107
109
|
subject.run(&test_run_callback)
|
@@ -118,12 +120,12 @@ module Assert::Assertions
|
|
118
120
|
|
119
121
|
class AssertNotSameDiffTests < DiffTests
|
120
122
|
desc "`assert_not_same`"
|
121
|
-
subject
|
123
|
+
subject do
|
122
124
|
act_obj = act_obj1
|
123
125
|
Factory.test(config1) do
|
124
126
|
assert_not_same(act_obj, act_obj)
|
125
127
|
end
|
126
|
-
|
128
|
+
end
|
127
129
|
|
128
130
|
should "include diff output in the fail messages" do
|
129
131
|
subject.run(&test_run_callback)
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require "assert"
|
2
4
|
require "assert/assertions"
|
3
5
|
|
@@ -8,17 +10,17 @@ module Assert::Assertions
|
|
8
10
|
include Assert::Test::TestHelpers
|
9
11
|
|
10
12
|
desc "`assert_true`"
|
11
|
-
subject
|
13
|
+
subject do
|
12
14
|
args = args1
|
13
15
|
Factory.test do
|
14
16
|
assert_true(true) # pass
|
15
17
|
assert_true(*args) # fail
|
16
18
|
end
|
17
|
-
|
19
|
+
end
|
18
20
|
|
19
|
-
let(:desc1)
|
20
|
-
let(:args1)
|
21
|
-
let(:config1)
|
21
|
+
let(:desc1){ "assert true fail desc" }
|
22
|
+
let(:args1){ ["whatever", desc1] }
|
23
|
+
let(:config1){ subject.config }
|
22
24
|
|
23
25
|
should "produce results as expected" do
|
24
26
|
subject.run(&test_run_callback)
|
@@ -27,7 +29,9 @@ module Assert::Assertions
|
|
27
29
|
assert_that(test_run_result_count(:pass)).equals(1)
|
28
30
|
assert_that(test_run_result_count(:fail)).equals(1)
|
29
31
|
|
30
|
-
exp =
|
32
|
+
exp =
|
33
|
+
"#{args1[1]}\nExpected #{Assert::U.show(args1[0], config1)} to "\
|
34
|
+
"be true."
|
31
35
|
assert_that(test_run_results(:fail).first.message).equals(exp)
|
32
36
|
end
|
33
37
|
end
|
@@ -36,17 +40,17 @@ module Assert::Assertions
|
|
36
40
|
include Assert::Test::TestHelpers
|
37
41
|
|
38
42
|
desc "`assert_not_true`"
|
39
|
-
subject
|
43
|
+
subject do
|
40
44
|
args = args1
|
41
45
|
Factory.test do
|
42
46
|
assert_not_true(false) # pass
|
43
47
|
assert_not_true(*args) # fail
|
44
48
|
end
|
45
|
-
|
49
|
+
end
|
46
50
|
|
47
|
-
let(:desc1)
|
48
|
-
let(:args1)
|
49
|
-
let(:config1)
|
51
|
+
let(:desc1){ "assert not true fail desc" }
|
52
|
+
let(:args1){ [true, desc1] }
|
53
|
+
let(:config1){ subject.config }
|
50
54
|
|
51
55
|
should "produce results as expected" do
|
52
56
|
subject.run(&test_run_callback)
|
@@ -55,7 +59,9 @@ module Assert::Assertions
|
|
55
59
|
assert_that(test_run_result_count(:pass)).equals(1)
|
56
60
|
assert_that(test_run_result_count(:fail)).equals(1)
|
57
61
|
|
58
|
-
exp =
|
62
|
+
exp =
|
63
|
+
"#{args1[1]}\nExpected #{Assert::U.show(args1[0], config1)} to "\
|
64
|
+
"not be true."
|
59
65
|
assert_that(test_run_results(:fail).first.message).equals(exp)
|
60
66
|
end
|
61
67
|
end
|
@@ -64,17 +70,17 @@ module Assert::Assertions
|
|
64
70
|
include Assert::Test::TestHelpers
|
65
71
|
|
66
72
|
desc "`assert_false`"
|
67
|
-
subject
|
73
|
+
subject do
|
68
74
|
args = args1
|
69
75
|
Factory.test do
|
70
76
|
assert_false(false) # pass
|
71
77
|
assert_false(*args) # fail
|
72
78
|
end
|
73
|
-
|
79
|
+
end
|
74
80
|
|
75
|
-
let(:desc1)
|
76
|
-
let(:args1)
|
77
|
-
let(:config1)
|
81
|
+
let(:desc1){ "assert false fail desc" }
|
82
|
+
let(:args1){ ["whatever", desc1] }
|
83
|
+
let(:config1){ subject.config }
|
78
84
|
|
79
85
|
should "produce results as expected" do
|
80
86
|
subject.run(&test_run_callback)
|
@@ -83,7 +89,9 @@ module Assert::Assertions
|
|
83
89
|
assert_that(test_run_result_count(:pass)).equals(1)
|
84
90
|
assert_that(test_run_result_count(:fail)).equals(1)
|
85
91
|
|
86
|
-
exp =
|
92
|
+
exp =
|
93
|
+
"#{args1[1]}\nExpected #{Assert::U.show(args1[0], config1)} to "\
|
94
|
+
"be false."
|
87
95
|
assert_that(test_run_results(:fail).first.message).equals(exp)
|
88
96
|
end
|
89
97
|
end
|
@@ -92,17 +100,17 @@ module Assert::Assertions
|
|
92
100
|
include Assert::Test::TestHelpers
|
93
101
|
|
94
102
|
desc "`assert_not_false`"
|
95
|
-
subject
|
103
|
+
subject do
|
96
104
|
args = args1
|
97
105
|
Factory.test do
|
98
106
|
assert_not_false(true) # pass
|
99
107
|
assert_not_false(*args) # fail
|
100
108
|
end
|
101
|
-
|
109
|
+
end
|
102
110
|
|
103
|
-
let(:desc1)
|
104
|
-
let(:args1)
|
105
|
-
let(:config1)
|
111
|
+
let(:desc1){ "assert not false fail desc" }
|
112
|
+
let(:args1){ [false, desc1] }
|
113
|
+
let(:config1){ subject.config }
|
106
114
|
|
107
115
|
should "produce results as expected" do
|
108
116
|
subject.run(&test_run_callback)
|
@@ -111,7 +119,9 @@ module Assert::Assertions
|
|
111
119
|
assert_that(test_run_result_count(:pass)).equals(1)
|
112
120
|
assert_that(test_run_result_count(:fail)).equals(1)
|
113
121
|
|
114
|
-
exp =
|
122
|
+
exp =
|
123
|
+
"#{args1[1]}\nExpected #{Assert::U.show(args1[0], config1)} to "\
|
124
|
+
"not be false."
|
115
125
|
assert_that(test_run_results(:fail).first.message).equals(exp)
|
116
126
|
end
|
117
127
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require "assert"
|
2
4
|
require "assert/assertions"
|
3
5
|
|
@@ -6,21 +8,26 @@ module Assert::Assertions
|
|
6
8
|
include Assert::Test::TestHelpers
|
7
9
|
|
8
10
|
desc "Assert::Context"
|
9
|
-
subject
|
11
|
+
subject{ context_class1.new(test1, test1.config, proc{ |r| }) }
|
10
12
|
|
11
|
-
let(:context_class1)
|
12
|
-
let(:test1)
|
13
|
+
let(:context_class1){ Factory.modes_off_context_class }
|
14
|
+
let(:test1){ Factory.test }
|
13
15
|
|
14
16
|
should have_imeths :assert_block, :assert_not_block, :refute_block
|
15
17
|
should have_imeths :assert_empty, :assert_not_empty, :refute_empty
|
16
18
|
should have_imeths :assert_equal, :assert_not_equal, :refute_equal
|
17
|
-
should have_imeths :assert_file_exists, :assert_not_file_exists
|
19
|
+
should have_imeths :assert_file_exists, :assert_not_file_exists
|
20
|
+
should have_imeths :refute_file_exists
|
18
21
|
should have_imeths :assert_includes, :assert_not_includes
|
19
22
|
should have_imeths :assert_included, :assert_not_included
|
20
23
|
should have_imeths :refute_includes, :refute_included
|
21
|
-
should have_imeths :assert_instance_of, :assert_not_instance_of
|
24
|
+
should have_imeths :assert_instance_of, :assert_not_instance_of
|
25
|
+
should have_imeths :refute_instance_of
|
26
|
+
should have_imeths :assert_is_a, :assert_is_not_a, :assert_not_a
|
27
|
+
should have_imeths :refute_is_a
|
22
28
|
should have_imeths :assert_kind_of, :assert_not_kind_of, :refute_kind_of
|
23
|
-
should have_imeths :assert_match, :assert_not_match, :assert_no_match
|
29
|
+
should have_imeths :assert_match, :assert_not_match, :assert_no_match
|
30
|
+
should have_imeths :refute_match
|
24
31
|
should have_imeths :assert_nil, :assert_not_nil, :refute_nil
|
25
32
|
should have_imeths :assert_true, :assert_not_true, :refute_true
|
26
33
|
should have_imeths :assert_false, :assert_not_false, :refute_false
|
@@ -39,14 +46,14 @@ module Assert::Assertions
|
|
39
46
|
tests.each{ |test| test.run(&test_run_callback) }
|
40
47
|
end
|
41
48
|
|
42
|
-
let(:tests)
|
49
|
+
let(:tests) do
|
43
50
|
context_info = Factory.context_info(context_class1)
|
44
51
|
Assert::Assertions::IGNORED_ASSERTION_HELPERS.map do |helper|
|
45
52
|
Factory.test("ignored assertion helper #{helper}", context_info) do
|
46
|
-
|
53
|
+
send(helper, "doesn't matter")
|
47
54
|
end
|
48
55
|
end
|
49
|
-
|
56
|
+
end
|
50
57
|
|
51
58
|
should "have an ignored result for each helper in the constant" do
|
52
59
|
exp = Assert::Assertions::IGNORED_ASSERTION_HELPERS.size
|