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.
Files changed (82) hide show
  1. checksums.yaml +7 -7
  2. data/Gemfile +3 -1
  3. data/README.md +79 -54
  4. data/assert.gemspec +6 -5
  5. data/bin/assert +4 -4
  6. data/lib/assert.rb +8 -18
  7. data/lib/assert/actual_value.rb +127 -0
  8. data/lib/assert/assert_runner.rb +7 -10
  9. data/lib/assert/assertions.rb +15 -28
  10. data/lib/assert/cli.rb +41 -57
  11. data/lib/assert/config.rb +8 -12
  12. data/lib/assert/config_helpers.rb +6 -10
  13. data/lib/assert/context.rb +30 -24
  14. data/lib/assert/context/let_dsl.rb +13 -0
  15. data/lib/assert/context/method_missing.rb +19 -0
  16. data/lib/assert/context/setup_dsl.rb +0 -4
  17. data/lib/assert/context/subject_dsl.rb +0 -4
  18. data/lib/assert/context/suite_dsl.rb +0 -4
  19. data/lib/assert/context/test_dsl.rb +5 -9
  20. data/lib/assert/context_info.rb +2 -6
  21. data/lib/assert/default_runner.rb +1 -5
  22. data/lib/assert/default_suite.rb +1 -6
  23. data/lib/assert/default_view.rb +8 -12
  24. data/lib/assert/factory.rb +1 -4
  25. data/lib/assert/file_line.rb +0 -4
  26. data/lib/assert/macro.rb +1 -4
  27. data/lib/assert/macros/methods.rb +5 -11
  28. data/lib/assert/result.rb +19 -34
  29. data/lib/assert/runner.rb +12 -11
  30. data/lib/assert/stub.rb +16 -2
  31. data/lib/assert/suite.rb +3 -7
  32. data/lib/assert/test.rb +13 -18
  33. data/lib/assert/utils.rb +8 -12
  34. data/lib/assert/version.rb +1 -1
  35. data/lib/assert/view.rb +18 -21
  36. data/lib/assert/view_helpers.rb +6 -17
  37. data/log/{.gitkeep → .keep} +0 -0
  38. data/test/helper.rb +26 -41
  39. data/test/support/factory.rb +20 -6
  40. data/test/support/inherited_stuff.rb +0 -2
  41. data/test/system/stub_tests.rb +350 -354
  42. data/test/system/test_tests.rb +119 -133
  43. data/test/unit/actual_value_tests.rb +335 -0
  44. data/test/unit/assert_tests.rb +125 -52
  45. data/test/unit/assertions/assert_block_tests.rb +34 -37
  46. data/test/unit/assertions/assert_empty_tests.rb +38 -38
  47. data/test/unit/assertions/assert_equal_tests.rb +84 -86
  48. data/test/unit/assertions/assert_file_exists_tests.rb +37 -39
  49. data/test/unit/assertions/assert_includes_tests.rb +45 -46
  50. data/test/unit/assertions/assert_instance_of_tests.rb +39 -40
  51. data/test/unit/assertions/assert_kind_of_tests.rb +39 -40
  52. data/test/unit/assertions/assert_match_tests.rb +39 -40
  53. data/test/unit/assertions/assert_nil_tests.rb +35 -38
  54. data/test/unit/assertions/assert_raises_tests.rb +58 -62
  55. data/test/unit/assertions/assert_respond_to_tests.rb +41 -42
  56. data/test/unit/assertions/assert_same_tests.rb +94 -90
  57. data/test/unit/assertions/assert_true_false_tests.rb +67 -69
  58. data/test/unit/assertions_tests.rb +17 -19
  59. data/test/unit/config_helpers_tests.rb +41 -43
  60. data/test/unit/config_tests.rb +42 -46
  61. data/test/unit/context/let_dsl_tests.rb +10 -0
  62. data/test/unit/context/setup_dsl_tests.rb +72 -91
  63. data/test/unit/context/subject_dsl_tests.rb +18 -51
  64. data/test/unit/context/suite_dsl_tests.rb +19 -23
  65. data/test/unit/context/test_dsl_tests.rb +52 -59
  66. data/test/unit/context_info_tests.rb +19 -21
  67. data/test/unit/context_tests.rb +175 -178
  68. data/test/unit/default_runner_tests.rb +4 -10
  69. data/test/unit/default_suite_tests.rb +54 -59
  70. data/test/unit/factory_tests.rb +6 -9
  71. data/test/unit/file_line_tests.rb +34 -40
  72. data/test/unit/macro_tests.rb +11 -20
  73. data/test/unit/result_tests.rb +156 -182
  74. data/test/unit/runner_tests.rb +72 -79
  75. data/test/unit/suite_tests.rb +62 -63
  76. data/test/unit/test_tests.rb +143 -147
  77. data/test/unit/utils_tests.rb +49 -62
  78. data/test/unit/view_helpers_tests.rb +67 -70
  79. data/test/unit/view_tests.rb +26 -32
  80. metadata +54 -47
  81. data/.assert.rb +0 -3
  82. data/.gitignore +0 -19
@@ -1,61 +1,58 @@
1
- require 'assert'
2
- require 'assert/assertions'
1
+ require "assert"
2
+ require "assert/assertions"
3
3
 
4
4
  module Assert::Assertions
5
-
6
5
  class AssertBlockTests < Assert::Context
7
6
  include Assert::Test::TestHelpers
8
7
 
9
8
  desc "`assert_block`"
10
- setup do
11
- desc = @desc = "assert block fail desc"
12
- @test = Factory.test do
13
- assert_block{ true } # pass
14
- assert_block(desc){ false } # fail
9
+ subject { test1 }
10
+
11
+ let(:desc1) { "assert block fail desc" }
12
+ let(:test1) {
13
+ desc = desc1
14
+ Factory.test do
15
+ assert_block { true } # pass
16
+ assert_block(desc) { false } # fail
15
17
  end
16
- @test.run(&test_run_callback)
17
- end
18
- subject{ @test }
18
+ }
19
19
 
20
20
  should "produce results as expected" do
21
- assert_equal 2, test_run_result_count
22
- assert_equal 1, test_run_result_count(:pass)
23
- assert_equal 1, test_run_result_count(:fail)
24
- end
21
+ subject.run(&test_run_callback)
25
22
 
26
- should "have a fail message with custom and generic explanations" do
27
- exp = "#{@desc}\nExpected block to return a true value."
28
- assert_equal exp, test_run_results(:fail).first.message
29
- end
23
+ assert_that(test_run_result_count).equals(2)
24
+ assert_that(test_run_result_count(:pass)).equals(1)
25
+ assert_that(test_run_result_count(:fail)).equals(1)
30
26
 
27
+ exp = "#{desc1}\nExpected block to return a true value."
28
+ assert_that(test_run_results(:fail).first.message).equals(exp)
29
+ end
31
30
  end
32
31
 
33
32
  class AssertNotBlockTests < Assert::Context
34
33
  include Assert::Test::TestHelpers
35
34
 
36
35
  desc "`assert_not_block`"
37
- setup do
38
- desc = @desc = "assert not block fail desc"
39
- @test = Factory.test do
40
- assert_not_block(desc){ true } # fail
41
- assert_not_block{ false } # pass
36
+ subject { test1 }
37
+
38
+ let(:desc1) { "assert not block fail desc" }
39
+ let(:test1) {
40
+ desc = desc1
41
+ Factory.test do
42
+ assert_not_block(desc) { true } # fail
43
+ assert_not_block { false } # pass
42
44
  end
43
- @test.run(&test_run_callback)
44
- end
45
- subject{ @test }
45
+ }
46
46
 
47
47
  should "produce results as expected" do
48
- assert_equal 2, test_run_result_count
49
- assert_equal 1, test_run_result_count(:pass)
50
- assert_equal 1, test_run_result_count(:fail)
51
- end
48
+ subject.run(&test_run_callback)
52
49
 
53
- should "have a fail message with custom and generic explanations" do
54
- exp = "#{@desc}\nExpected block to not return a true value."
55
- assert_equal exp, test_run_results(:fail).first.message
56
- end
50
+ assert_that(test_run_result_count).equals(2)
51
+ assert_that(test_run_result_count(:pass)).equals(1)
52
+ assert_that(test_run_result_count(:fail)).equals(1)
57
53
 
54
+ exp = "#{desc1}\nExpected block to not return a true value."
55
+ assert_that(test_run_results(:fail).first.message).equals(exp)
56
+ end
58
57
  end
59
-
60
58
  end
61
-
@@ -1,66 +1,66 @@
1
- require 'assert'
2
- require 'assert/assertions'
1
+ require "assert"
2
+ require "assert/assertions"
3
3
 
4
- require 'assert/utils'
4
+ require "assert/utils"
5
5
 
6
6
  module Assert::Assertions
7
-
8
7
  class AssertEmptyTests < Assert::Context
9
8
  include Assert::Test::TestHelpers
10
9
 
11
10
  desc "`assert_empty`"
12
- setup do
13
- desc = @desc = "assert empty fail desc"
14
- args = @args = [ [ 1 ], desc ]
15
- @test = Factory.test do
11
+ subject { test1 }
12
+
13
+ let(:desc1) { "assert empty fail desc" }
14
+ let(:args1) { [[1], desc1] }
15
+ let(:test1) {
16
+ args = args1
17
+ Factory.test do
16
18
  assert_empty([]) # pass
17
19
  assert_empty(*args) # fail
18
20
  end
19
- @c = @test.config
20
- @test.run(&test_run_callback)
21
- end
22
- subject{ @test }
21
+ }
22
+ let(:config1) { test1.config }
23
23
 
24
24
  should "produce results as expected" do
25
- assert_equal 2, test_run_result_count
26
- assert_equal 1, test_run_result_count(:pass)
27
- assert_equal 1, test_run_result_count(:fail)
28
- end
25
+ subject.run(&test_run_callback)
29
26
 
30
- should "have a fail message with custom and generic explanations" do
31
- exp = "#{@args[1]}\nExpected #{Assert::U.show(@args[0], @c)} to be empty."
32
- assert_equal exp, test_run_results(:fail).first.message
33
- end
27
+ assert_that(test_run_result_count).equals(2)
28
+ assert_that(test_run_result_count(:pass)).equals(1)
29
+ assert_that(test_run_result_count(:fail)).equals(1)
34
30
 
31
+ exp =
32
+ "#{args1[1]}\nExpected #{Assert::U.show(args1[0], config1)} to be empty."
33
+ assert_that(test_run_results(:fail).first.message).equals(exp)
34
+ end
35
35
  end
36
36
 
37
37
  class AssertNotEmptyTests < Assert::Context
38
38
  include Assert::Test::TestHelpers
39
39
 
40
40
  desc "`assert_not_empty`"
41
- setup do
42
- desc = @desc = "assert not empty fail desc"
43
- args = @args = [ [], desc ]
44
- @test = Factory.test do
45
- assert_not_empty([ 1 ]) # pass
41
+ subject { test1 }
42
+
43
+ let(:desc1) { "assert not empty fail desc" }
44
+ let(:args1) { [[], desc1] }
45
+ let(:test1) {
46
+ args = args1
47
+ Factory.test do
48
+ assert_not_empty([1]) # pass
46
49
  assert_not_empty(*args) # fail
47
50
  end
48
- @c = @test.config
49
- @test.run(&test_run_callback)
50
- end
51
- subject{ @test }
51
+ }
52
+ let(:config1) { test1.config }
52
53
 
53
54
  should "produce results as expected" do
54
- assert_equal 2, test_run_result_count
55
- assert_equal 1, test_run_result_count(:pass)
56
- assert_equal 1, test_run_result_count(:fail)
57
- end
55
+ subject.run(&test_run_callback)
58
56
 
59
- should "have a fail message with custom and generic explanations" do
60
- exp = "#{@args[1]}\nExpected #{Assert::U.show(@args[0], @c)} to not be empty."
61
- assert_equal exp, test_run_results(:fail).first.message
62
- end
57
+ assert_that(test_run_result_count).equals(2)
58
+ assert_that(test_run_result_count(:pass)).equals(1)
59
+ assert_that(test_run_result_count(:fail)).equals(1)
63
60
 
61
+ exp =
62
+ "#{args1[1]}\nExpected #{Assert::U.show(args1[0], config1)} to not be empty."
63
+ assert_that(test_run_results(:fail).first.message).equals(exp)
64
+ end
64
65
  end
65
-
66
66
  end
@@ -1,147 +1,145 @@
1
- require 'assert'
2
- require 'assert/assertions'
1
+ require "assert"
2
+ require "assert/assertions"
3
3
 
4
- require 'assert/utils'
4
+ require "assert/utils"
5
5
 
6
6
  module Assert::Assertions
7
-
8
7
  class AssertEqualTests < Assert::Context
9
8
  include Assert::Test::TestHelpers
10
9
 
11
10
  desc "`assert_equal`"
12
- setup do
13
- desc = @desc = "assert equal fail desc"
14
- a = @a = [ '1', '2', desc ]
15
- @test = Factory.test do
16
- assert_equal(1, 1) # pass
17
- assert_equal(*a) # fail
11
+ subject { test1 }
12
+
13
+ let(:desc1) { "assert equal fail desc" }
14
+ let(:args1) { ["1", "2", desc1] }
15
+ let(:test1) {
16
+ args = args1
17
+ Factory.test do
18
+ assert_equal(1, 1) # pass
19
+ assert_equal(*args) # fail
18
20
  end
19
- @c = @test.config
20
- @test.run(&test_run_callback)
21
- end
22
- subject{ @test }
21
+ }
22
+ let(:config1) { test1.config }
23
23
 
24
24
  should "produce results as expected" do
25
- assert_equal 2, test_run_result_count
26
- assert_equal 1, test_run_result_count(:pass)
27
- assert_equal 1, test_run_result_count(:fail)
28
- end
25
+ subject.run(&test_run_callback)
29
26
 
30
- should "have a fail message with custom and generic explanations" do
31
- exp = "#{@a[2]}\nExpected #{Assert::U.show(@a[1], @c)}"\
32
- " to be equal to #{Assert::U.show(@a[0], @c)}."
33
- assert_equal exp, test_run_results(:fail).first.message
34
- end
27
+ assert_that(test_run_result_count).equals(2)
28
+ assert_that(test_run_result_count(:pass)).equals(1)
29
+ assert_that(test_run_result_count(:fail)).equals(1)
35
30
 
31
+ exp =
32
+ "#{args1[2]}\nExpected #{Assert::U.show(args1[1], config1)}"\
33
+ " to be equal to #{Assert::U.show(args1[0], config1)}."
34
+ assert_that(test_run_results(:fail).first.message).equals(exp)
35
+ end
36
36
  end
37
37
 
38
38
  class AssertNotEqualTests < Assert::Context
39
39
  include Assert::Test::TestHelpers
40
40
 
41
41
  desc "`assert_not_equal`"
42
- setup do
43
- desc = @desc = "assert not equal fail desc"
44
- a = @a = [ '1', '1', desc ]
45
- @test = Factory.test do
46
- assert_not_equal(*a) # fail
47
- assert_not_equal(1, 2) # pass
42
+ subject { test1 }
43
+
44
+ let(:desc1) { "assert not equal fail desc" }
45
+ let(:args1) { ["1", "1", desc1] }
46
+ let(:test1) {
47
+ args = args1
48
+ Factory.test do
49
+ assert_not_equal(*args) # fail
50
+ assert_not_equal(1, 2) # pass
48
51
  end
49
- @c = @test.config
50
- @test.run(&test_run_callback)
51
- end
52
- subject{ @test }
52
+ }
53
+ let(:config1) { test1.config }
53
54
 
54
55
  should "produce results as expected" do
55
- assert_equal 2, test_run_result_count
56
- assert_equal 1, test_run_result_count(:pass)
57
- assert_equal 1, test_run_result_count(:fail)
58
- end
56
+ subject.run(&test_run_callback)
59
57
 
60
- should "have a fail message with custom and generic explanations" do
61
- exp = "#{@a[2]}\nExpected #{Assert::U.show(@a[1], @c)}"\
62
- " to not be equal to #{Assert::U.show(@a[0], @c)}."
63
- assert_equal exp, test_run_results(:fail).first.message
64
- end
58
+ assert_that(test_run_result_count).equals(2)
59
+ assert_that(test_run_result_count(:pass)).equals(1)
60
+ assert_that(test_run_result_count(:fail)).equals(1)
65
61
 
62
+ exp =
63
+ "#{args1[2]}\nExpected #{Assert::U.show(args1[1], config1)}"\
64
+ " to not be equal to #{Assert::U.show(args1[0], config1)}."
65
+ assert_that(test_run_results(:fail).first.message).equals(exp)
66
+ end
66
67
  end
67
68
 
68
69
  class EqualOrderTests < Assert::Context
69
70
  include Assert::Test::TestHelpers
70
71
 
71
72
  desc "with objects that define custom equality operators"
72
- setup do
73
- is_class = Class.new do
74
- def ==(other); true; end
75
- end
76
- @is = is_class.new
77
73
 
78
- is_not_class = Class.new do
79
- def ==(other); false; end
80
- end
81
- @is_not = is_not_class.new
82
- end
74
+ let(:is_class) { Class.new do; def ==(other); true; end; end }
75
+ let(:is_not_class) { Class.new do; def ==(other); false; end; end }
76
+
77
+ let(:is1) { is_class.new }
78
+ let(:is_not1) { is_not_class.new }
83
79
 
84
80
  should "use the equality operator of the exp value" do
85
- assert_equal @is, @is_not
86
- assert_not_equal @is_not, @is
81
+ assert_that(is1).equals(is_not1)
82
+ assert_that(is_not1).does_not_equal(is1)
87
83
  end
88
-
89
84
  end
90
85
 
91
86
  class DiffTests < Assert::Context
92
87
  include Assert::Test::TestHelpers
93
88
 
94
89
  desc "with objects that should use diff when showing"
95
- setup do
96
- @exp_obj = "I'm a\nstring"
97
- @act_obj = "I am a \nstring"
98
-
99
- @c = Factory.modes_off_config
100
- @c.use_diff_proc(Assert::U.default_use_diff_proc)
101
- @c.run_diff_proc(Assert::U.syscmd_diff_proc)
102
90
 
103
- @exp_obj_show = Assert::U.show_for_diff(@exp_obj, @c)
104
- @act_obj_show = Assert::U.show_for_diff(@act_obj, @c)
105
- end
91
+ let(:config1) {
92
+ Factory.modes_off_config.tap do |config|
93
+ config.use_diff_proc(Assert::U.default_use_diff_proc)
94
+ config.run_diff_proc(Assert::U.syscmd_diff_proc)
95
+ end
96
+ }
106
97
 
98
+ let(:exp_obj1) { "I'm a\nstring" }
99
+ let(:act_obj1) { "I am a \nstring" }
100
+ let(:exp_obj_show1) { Assert::U.show_for_diff(exp_obj1, config1) }
101
+ let(:act_obj_show1) { Assert::U.show_for_diff(act_obj1, config1) }
107
102
  end
108
103
 
109
104
  class AssertEqualDiffTests < DiffTests
110
105
  desc "`assert_equal`"
111
- setup do
112
- exp_obj, act_obj = @exp_obj, @act_obj
113
- @test = Factory.test(@c) do
106
+ subject { test1 }
107
+
108
+ let(:test1) {
109
+ exp_obj, act_obj = exp_obj1, act_obj1
110
+ Factory.test(config1) do
114
111
  assert_equal(exp_obj, act_obj)
115
112
  end
116
- @test.run(&test_run_callback)
117
- end
118
- subject{ @test }
113
+ }
119
114
 
120
115
  should "include diff output in the fail messages" do
121
- exp = "Expected does not equal actual, diff:\n"\
122
- "#{Assert::U.syscmd_diff_proc.call(@exp_obj_show, @act_obj_show)}"
123
- assert_equal exp, test_run_results(:fail).first.message
124
- end
116
+ subject.run(&test_run_callback)
125
117
 
118
+ exp =
119
+ "Expected does not equal actual, diff:\n"\
120
+ "#{Assert::U.syscmd_diff_proc.call(exp_obj_show1, act_obj_show1)}"
121
+ assert_that(test_run_results(:fail).first.message).equals(exp)
122
+ end
126
123
  end
127
124
 
128
125
  class AssertNotEqualDiffTests < DiffTests
129
126
  desc "`assert_not_equal`"
130
- setup do
131
- exp_obj, act_obj = @exp_obj, @act_obj
132
- @test = Factory.test(@c) do
127
+ subject { test1 }
128
+
129
+ let(:test1) {
130
+ exp_obj = exp_obj1
131
+ Factory.test(config1) do
133
132
  assert_not_equal(exp_obj, exp_obj)
134
133
  end
135
- @test.run(&test_run_callback)
136
- end
137
- subject{ @test }
134
+ }
138
135
 
139
136
  should "include diff output in the fail messages" do
140
- exp = "Expected equals actual, diff:\n"\
141
- "#{Assert::U.syscmd_diff_proc.call(@exp_obj_show, @exp_obj_show)}"
142
- assert_equal exp, test_run_results(:fail).first.message
143
- end
137
+ subject.run(&test_run_callback)
144
138
 
139
+ exp =
140
+ "Expected equals actual, diff:\n"\
141
+ "#{Assert::U.syscmd_diff_proc.call(exp_obj_show1, exp_obj_show1)}"
142
+ assert_that(test_run_results(:fail).first.message).equals(exp)
143
+ end
145
144
  end
146
-
147
145
  end
@@ -1,7 +1,7 @@
1
- require 'assert'
2
- require 'assert/assertions'
1
+ require "assert"
2
+ require "assert/assertions"
3
3
 
4
- require 'assert/utils'
4
+ require "assert/utils"
5
5
 
6
6
  module Assert::Assertions
7
7
 
@@ -9,59 +9,57 @@ module Assert::Assertions
9
9
  include Assert::Test::TestHelpers
10
10
 
11
11
  desc "`assert_file_exists`"
12
- setup do
13
- desc = @desc = "assert file exists empty fail desc"
14
- args = @args = [ '/a/path/to/some/file/that/no/exists', desc ]
15
- @test = Factory.test do
12
+ subject { test1 }
13
+
14
+ let(:desc1) { "assert file exists fail desc" }
15
+ let(:args1) { ["/a/path/to/some/file/that/no/exists", desc1] }
16
+ let(:test1) {
17
+ args = args1
18
+ Factory.test do
16
19
  assert_file_exists(__FILE__) # pass
17
20
  assert_file_exists(*args) # fail
18
21
  end
19
- @c = @test.config
20
- @test.run(&test_run_callback)
21
- end
22
- subject{ @test }
22
+ }
23
+ let(:config1) { test1.config }
23
24
 
24
25
  should "produce results as expected" do
25
- assert_equal 2, test_run_result_count
26
- assert_equal 1, test_run_result_count(:pass)
27
- assert_equal 1, test_run_result_count(:fail)
28
- end
26
+ subject.run(&test_run_callback)
29
27
 
30
- should "have a fail message with custom and generic explanations" do
31
- exp = "#{@args[1]}\nExpected #{Assert::U.show(@args[0], @c)} to exist."
32
- assert_equal exp, test_run_results(:fail).first.message
33
- end
28
+ assert_that(test_run_result_count).equals(2)
29
+ assert_that(test_run_result_count(:pass)).equals(1)
30
+ assert_that(test_run_result_count(:fail)).equals(1)
34
31
 
32
+ exp = "#{args1[1]}\nExpected #{Assert::U.show(args1[0], config1)} to exist."
33
+ assert_that(test_run_results(:fail).first.message).equals(exp)
34
+ end
35
35
  end
36
36
 
37
37
  class AssertNotFileExistsTests < Assert::Context
38
38
  include Assert::Test::TestHelpers
39
39
 
40
40
  desc "`assert_not_file_exists`"
41
- setup do
42
- desc = @desc = "assert not file exists empty fail desc"
43
- args = @args = [ __FILE__, desc ]
44
- @test = Factory.test do
45
- assert_not_file_exists('/a/path/to/some/file/that/no/exists') # pass
46
- assert_not_file_exists(*args) # fail
41
+ subject { test1 }
42
+
43
+ let(:desc1) { "assert not file exists fail desc" }
44
+ let(:args1) { [__FILE__, desc1] }
45
+ let(:test1) {
46
+ args = args1
47
+ Factory.test do
48
+ assert_not_file_exists("/file/path") # pass
49
+ assert_not_file_exists(*args) # fail
47
50
  end
48
- @c = @test.config
49
- @test.run(&test_run_callback)
50
- end
51
- subject{ @test }
51
+ }
52
+ let(:config1) { test1.config }
52
53
 
53
54
  should "produce results as expected" do
54
- assert_equal 2, test_run_result_count
55
- assert_equal 1, test_run_result_count(:pass)
56
- assert_equal 1, test_run_result_count(:fail)
57
- end
55
+ subject.run(&test_run_callback)
58
56
 
59
- should "have a fail message with custom and generic explanations" do
60
- exp = "#{@args[1]}\nExpected #{Assert::U.show(@args[0], @c)} to not exist."
61
- assert_equal exp, test_run_results(:fail).first.message
62
- end
57
+ assert_that(test_run_result_count).equals(2)
58
+ assert_that(test_run_result_count(:pass)).equals(1)
59
+ assert_that(test_run_result_count(:fail)).equals(1)
63
60
 
61
+ exp = "#{args1[1]}\nExpected #{Assert::U.show(args1[0], config1)} to not exist."
62
+ assert_that(test_run_results(:fail).first.message).equals(exp)
63
+ end
64
64
  end
65
-
66
65
  end
67
-