assert 2.17.0 → 2.18.4

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 (80) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -2
  3. data/README.md +66 -41
  4. data/assert.gemspec +2 -3
  5. data/lib/assert.rb +0 -10
  6. data/lib/assert/actual_value.rb +127 -0
  7. data/lib/assert/assert_runner.rb +0 -3
  8. data/lib/assert/assertions.rb +10 -23
  9. data/lib/assert/cli.rb +30 -46
  10. data/lib/assert/config.rb +0 -4
  11. data/lib/assert/config_helpers.rb +0 -4
  12. data/lib/assert/context.rb +18 -9
  13. data/lib/assert/context/let_dsl.rb +13 -0
  14. data/lib/assert/context/method_missing.rb +19 -0
  15. data/lib/assert/context/setup_dsl.rb +0 -4
  16. data/lib/assert/context/subject_dsl.rb +23 -28
  17. data/lib/assert/context/suite_dsl.rb +0 -4
  18. data/lib/assert/context/test_dsl.rb +0 -4
  19. data/lib/assert/context_info.rb +0 -4
  20. data/lib/assert/default_runner.rb +0 -4
  21. data/lib/assert/default_suite.rb +0 -5
  22. data/lib/assert/default_view.rb +0 -4
  23. data/lib/assert/factory.rb +0 -3
  24. data/lib/assert/file_line.rb +0 -4
  25. data/lib/assert/macro.rb +0 -3
  26. data/lib/assert/macros/methods.rb +4 -10
  27. data/lib/assert/result.rb +2 -17
  28. data/lib/assert/runner.rb +0 -3
  29. data/lib/assert/stub.rb +15 -1
  30. data/lib/assert/suite.rb +0 -4
  31. data/lib/assert/test.rb +2 -7
  32. data/lib/assert/utils.rb +0 -4
  33. data/lib/assert/version.rb +1 -1
  34. data/lib/assert/view.rb +0 -3
  35. data/lib/assert/view_helpers.rb +0 -11
  36. data/log/{.gitkeep → .keep} +0 -0
  37. data/test/helper.rb +23 -29
  38. data/test/support/factory.rb +14 -0
  39. data/test/support/inherited_stuff.rb +0 -2
  40. data/test/system/stub_tests.rb +332 -352
  41. data/test/system/test_tests.rb +98 -124
  42. data/test/unit/actual_value_tests.rb +335 -0
  43. data/test/unit/assert_tests.rb +121 -46
  44. data/test/unit/assertions/assert_block_tests.rb +30 -35
  45. data/test/unit/assertions/assert_empty_tests.rb +33 -35
  46. data/test/unit/assertions/assert_equal_tests.rb +75 -83
  47. data/test/unit/assertions/assert_file_exists_tests.rb +32 -36
  48. data/test/unit/assertions/assert_includes_tests.rb +38 -41
  49. data/test/unit/assertions/assert_instance_of_tests.rb +34 -37
  50. data/test/unit/assertions/assert_kind_of_tests.rb +34 -37
  51. data/test/unit/assertions/assert_match_tests.rb +34 -37
  52. data/test/unit/assertions/assert_nil_tests.rb +30 -35
  53. data/test/unit/assertions/assert_raises_tests.rb +54 -60
  54. data/test/unit/assertions/assert_respond_to_tests.rb +36 -39
  55. data/test/unit/assertions/assert_same_tests.rb +86 -88
  56. data/test/unit/assertions/assert_true_false_tests.rb +60 -66
  57. data/test/unit/assertions_tests.rb +14 -17
  58. data/test/unit/config_helpers_tests.rb +41 -39
  59. data/test/unit/config_tests.rb +38 -37
  60. data/test/unit/context/let_dsl_tests.rb +10 -0
  61. data/test/unit/context/setup_dsl_tests.rb +68 -87
  62. data/test/unit/context/subject_dsl_tests.rb +15 -49
  63. data/test/unit/context/suite_dsl_tests.rb +15 -20
  64. data/test/unit/context/test_dsl_tests.rb +50 -57
  65. data/test/unit/context_info_tests.rb +23 -18
  66. data/test/unit/context_tests.rb +183 -194
  67. data/test/unit/default_runner_tests.rb +1 -7
  68. data/test/unit/default_suite_tests.rb +57 -56
  69. data/test/unit/factory_tests.rb +5 -6
  70. data/test/unit/file_line_tests.rb +33 -39
  71. data/test/unit/macro_tests.rb +14 -18
  72. data/test/unit/result_tests.rb +159 -196
  73. data/test/unit/runner_tests.rb +64 -71
  74. data/test/unit/suite_tests.rb +58 -59
  75. data/test/unit/test_tests.rb +125 -136
  76. data/test/unit/utils_tests.rb +43 -54
  77. data/test/unit/view_helpers_tests.rb +54 -58
  78. data/test/unit/view_tests.rb +22 -27
  79. metadata +15 -10
  80. data/tmp/.gitkeep +0 -0
@@ -2,96 +2,90 @@ require "assert"
2
2
  require "assert/assertions"
3
3
 
4
4
  module Assert::Assertions
5
-
6
5
  class AssertRaisesTests < Assert::Context
7
6
  include Assert::Test::TestHelpers
8
7
 
9
8
  desc "`assert_raises`"
10
- setup do
11
- d = @d = "assert raises fail desc"
12
- @test = Factory.test do
13
- assert_raises(StandardError, RuntimeError){ raise(StandardError) } # pass
14
- assert_raises(StandardError, RuntimeError, d){ raise(Exception) } # fail
15
- assert_raises(RuntimeError, d){ raise(StandardError) } # fail
16
- assert_raises(RuntimeError, d){ true } # fail
17
- assert_raises(d){ true } # fail
9
+ subject {
10
+ desc = desc1
11
+ Factory.test do
12
+ assert_raises(StandardError, RuntimeError) { raise(StandardError) } # pass
13
+ assert_raises(StandardError, RuntimeError, desc) { raise(Exception) } # fail
14
+ assert_raises(RuntimeError, desc) { raise(StandardError) } # fail
15
+ assert_raises(RuntimeError, desc) { true } # fail
16
+ assert_raises(desc) { true } # fail
18
17
  end
19
- @test.run(&test_run_callback)
20
- end
21
- subject{ @test }
18
+ }
22
19
 
23
- should "produce results as expected" do
24
- assert_equal 5, test_run_result_count
25
- assert_equal 1, test_run_result_count(:pass)
26
- assert_equal 4, test_run_result_count(:fail)
27
- end
20
+ let(:desc1) { "assert raises fail desc" }
28
21
 
29
- should "have a fail message with custom and generic explanations" do
30
- exp = [
31
- "#{@d}\nStandardError or RuntimeError exception expected, not:",
32
- "#{@d}\nRuntimeError exception expected, not:",
33
- "#{@d}\nRuntimeError exception expected but nothing raised.",
34
- "#{@d}\nAn exception expected but nothing raised."
35
- ]
22
+ should "produce results as expected" do
23
+ subject.run(&test_run_callback)
24
+
25
+ assert_that(test_run_result_count).equals(5)
26
+ assert_that(test_run_result_count(:pass)).equals(1)
27
+ assert_that(test_run_result_count(:fail)).equals(4)
28
+
29
+ exp =
30
+ [ "#{desc1}\nStandardError or RuntimeError exception expected, not:",
31
+ "#{desc1}\nRuntimeError exception expected, not:",
32
+ "#{desc1}\nRuntimeError exception expected but nothing raised.",
33
+ "#{desc1}\nAn exception expected but nothing raised."
34
+ ]
36
35
  messages = test_run_results(:fail).map(&:message)
37
- messages.each_with_index{ |msg, n| assert_match /^#{exp[n]}/, msg }
36
+ messages.each_with_index{ |msg, n| assert_that(msg).matches(/^#{exp[n]}/) }
38
37
  end
39
38
 
40
39
  should "return any raised exception instance" do
41
40
  error = nil
42
41
  error_msg = Factory.string
43
- test = Factory.test do
44
- error = assert_raises(RuntimeError){ raise(RuntimeError, error_msg) }
45
- end
42
+
43
+ test =
44
+ Factory.test do
45
+ error = assert_raises(RuntimeError) { raise(RuntimeError, error_msg) }
46
+ end
46
47
  test.run
47
48
 
48
- assert_not_nil error
49
- assert_kind_of RuntimeError, error
50
- assert_equal error_msg, error.message
49
+ assert_that(error).is_not_nil
50
+ assert_that(error).is_kind_of(RuntimeError)
51
+ assert_that(error.message).equals(error_msg)
51
52
 
52
- test = Factory.test do
53
- error = assert_raises(RuntimeError){ }
54
- end
53
+ test = Factory.test { error = assert_raises(RuntimeError) {} }
55
54
  test.run
56
55
 
57
- assert_nil error
56
+ assert_that(error).is_nil
58
57
  end
59
-
60
58
  end
61
59
 
62
60
  class AssertNothingRaisedTests < Assert::Context
63
61
  include Assert::Test::TestHelpers
64
62
 
65
63
  desc "`assert_nothing_raised`"
66
- setup do
67
- d = @d = "assert nothing raised fail desc"
68
- @test = Factory.test do
69
- anr = :assert_nothing_raised
70
- self.send(anr, StandardError, RuntimeError, d){ raise(StandardError) } # fail
71
- self.send(anr, RuntimeError){ raise(StandardError) } # pass
72
- self.send(anr, d){ raise(RuntimeError) } # fail
73
- self.send(anr){ true } # pass
64
+ subject {
65
+ desc = desc1
66
+ Factory.test do
67
+ assert_nothing_raised(StandardError, RuntimeError, desc) { raise(StandardError) } # fail
68
+ assert_nothing_raised(RuntimeError) { raise(StandardError) } # pass
69
+ assert_nothing_raised(desc) { raise(RuntimeError) } # fail
70
+ assert_nothing_raised { true } # pass
74
71
  end
75
- @test.run(&test_run_callback)
76
- end
77
- subject{ @test }
72
+ }
73
+
74
+ let(:desc1) { "assert nothing raised fail desc" }
78
75
 
79
76
  should "produce results as expected" do
80
- assert_equal 4, test_run_result_count
81
- assert_equal 2, test_run_result_count(:pass)
82
- assert_equal 2, test_run_result_count(:fail)
83
- end
77
+ subject.run(&test_run_callback)
84
78
 
85
- should "have a fail message with custom and generic explanations" do
86
- exp = [
87
- "#{@d}\nStandardError or RuntimeError exception not expected, but raised:",
88
- "#{@d}\nAn exception not expected, but raised:"
89
- ]
79
+ assert_that(test_run_result_count).equals(4)
80
+ assert_that(test_run_result_count(:pass)).equals(2)
81
+ assert_that(test_run_result_count(:fail)).equals(2)
82
+
83
+ exp =
84
+ [ "#{desc1}\nStandardError or RuntimeError exception not expected, but raised:",
85
+ "#{desc1}\nAn exception not expected, but raised:"
86
+ ]
90
87
  messages = test_run_results(:fail).map(&:message)
91
- messages.each_with_index{ |msg, n| assert_match /^#{exp[n]}/, msg }
88
+ messages.each_with_index{ |msg, n| assert_that(msg).matches(/^#{exp[n]}/) }
92
89
  end
93
-
94
90
  end
95
-
96
91
  end
97
-
@@ -4,68 +4,65 @@ require "assert/assertions"
4
4
  require "assert/utils"
5
5
 
6
6
  module Assert::Assertions
7
-
8
7
  class AssertRespondToTests < Assert::Context
9
8
  include Assert::Test::TestHelpers
10
9
 
11
10
  desc "`assert_respond_to`"
12
- setup do
13
- desc = @desc = "assert respond to fail desc"
14
- args = @args = [:abs, "1", desc]
15
- @test = Factory.test do
11
+ subject {
12
+ args = args1
13
+ Factory.test do
16
14
  assert_respond_to(:abs, 1) # pass
17
15
  assert_respond_to(*args) # fail
18
16
  end
19
- @c = @test.config
20
- @test.run(&test_run_callback)
21
- end
22
- subject{ @test }
17
+ }
18
+
19
+ let(:desc1) { "assert respond to fail desc" }
20
+ let(:args1) { [:abs, "1", desc1] }
21
+ let(:config1) { subject.config }
23
22
 
24
23
  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
24
+ subject.run(&test_run_callback)
29
25
 
30
- should "have a fail message with custom and generic explanations" do
31
- exp = "#{@args[2]}\n"\
32
- "Expected #{Assert::U.show(@args[1], @c)} (#{@args[1].class})"\
33
- " to respond to `#{@args[0]}`."
34
- assert_equal exp, test_run_results(:fail).first.message
35
- end
26
+ assert_that(test_run_result_count).equals(2)
27
+ assert_that(test_run_result_count(:pass)).equals(1)
28
+ assert_that(test_run_result_count(:fail)).equals(1)
36
29
 
30
+ exp =
31
+ "#{args1[2]}\n"\
32
+ "Expected #{Assert::U.show(args1[1], config1)} (#{args1[1].class})"\
33
+ " to respond to `#{args1[0]}`."
34
+ assert_that(test_run_results(:fail).first.message).equals(exp)
35
+ end
37
36
  end
38
37
 
39
38
  class AssertNotRespondToTests < Assert::Context
40
39
  include Assert::Test::TestHelpers
41
40
 
42
41
  desc "`assert_not_respond_to`"
43
- setup do
44
- desc = @desc = "assert not respond to fail desc"
45
- args = @args = [:abs, 1, desc]
46
- @test = Factory.test do
42
+ subject {
43
+ args = args1
44
+ Factory.test do
47
45
  assert_not_respond_to(*args) # fail
48
46
  assert_not_respond_to(:abs, "1") # pass
49
47
  end
50
- @c = @test.config
51
- @test.run(&test_run_callback)
52
- end
53
- subject{ @test }
48
+ }
49
+
50
+ let(:desc1) { "assert not respond to fail desc" }
51
+ let(:args1) { [:abs, 1, desc1] }
52
+ let(:config1) { subject.config }
54
53
 
55
54
  should "produce results as expected" do
56
- assert_equal 2, test_run_result_count
57
- assert_equal 1, test_run_result_count(:pass)
58
- assert_equal 1, test_run_result_count(:fail)
59
- end
55
+ subject.run(&test_run_callback)
60
56
 
61
- should "have a fail message with custom and generic explanations" do
62
- exp = "#{@args[2]}\n"\
63
- "Expected #{Assert::U.show(@args[1], @c)} (#{@args[1].class})"\
64
- " to not respond to `#{@args[0]}`."
65
- assert_equal exp, test_run_results(:fail).first.message
66
- 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)
67
60
 
61
+ exp =
62
+ "#{args1[2]}\n"\
63
+ "Expected #{Assert::U.show(args1[1], config1)} (#{args1[1].class})"\
64
+ " to not respond to `#{args1[0]}`."
65
+ assert_that(test_run_results(:fail).first.message).equals(exp)
66
+ end
68
67
  end
69
-
70
68
  end
71
-
@@ -4,139 +4,137 @@ require "assert/assertions"
4
4
  require "assert/utils"
5
5
 
6
6
  module Assert::Assertions
7
-
8
7
  class AssertSameTests < Assert::Context
9
8
  include Assert::Test::TestHelpers
10
9
 
11
10
  desc "`assert_same`"
12
- setup do
13
- klass = Class.new; object = klass.new
14
- desc = @desc = "assert same fail desc"
15
- args = @args = [object, klass.new, desc]
16
- @test = Factory.test do
11
+ subject {
12
+ args = args1
13
+ object = object1
14
+ Factory.test do
17
15
  assert_same(object, object) # pass
18
16
  assert_same(*args) # fail
19
17
  end
20
- @c = @test.config
21
- @test.run(&test_run_callback)
22
- end
23
- subject{ @test }
18
+ }
24
19
 
25
- should "produce results as expected" do
26
- assert_equal 2, test_run_result_count
27
- assert_equal 1, test_run_result_count(:pass)
28
- assert_equal 1, test_run_result_count(:fail)
29
- end
20
+ let(:class1) { Class.new }
21
+ let(:object1) { class1.new }
22
+ let(:desc1) { "assert same fail desc" }
23
+ let(:args1) { [object1, class1.new, desc1] }
24
+ let(:config1) { subject.config }
30
25
 
31
- should "have a fail message with custom and generic explanations" do
32
- exp = "#{@args[2]}\n"\
33
- "Expected #{Assert::U.show(@args[1], @c)}"\
34
- " (#<#{@args[1].class}:#{"0x0%x" % (@args[1].object_id << 1)}>)"\
35
- " to be the same as #{Assert::U.show(@args[0], @c)}"\
36
- " (#<#{@args[0].class}:#{"0x0%x" % (@args[0].object_id << 1)}>)."
37
- assert_equal exp, test_run_results(:fail).first.message
26
+ should "produce results as expected" do
27
+ subject.run(&test_run_callback)
28
+
29
+ assert_that(test_run_result_count).equals(2)
30
+ assert_that(test_run_result_count(:pass)).equals(1)
31
+ assert_that(test_run_result_count(:fail)).equals(1)
32
+
33
+ exp =
34
+ "#{args1[2]}\n"\
35
+ "Expected #{Assert::U.show(args1[1], config1)}"\
36
+ " (#<#{args1[1].class}:#{"0x0%x" % (args1[1].object_id << 1)}>)"\
37
+ " to be the same as #{Assert::U.show(args1[0], config1)}"\
38
+ " (#<#{args1[0].class}:#{"0x0%x" % (args1[0].object_id << 1)}>)."
39
+ assert_that(test_run_results(:fail).first.message).equals(exp)
38
40
  end
39
-
40
41
  end
41
42
 
42
43
  class AssertNotSameTests < Assert::Context
43
44
  include Assert::Test::TestHelpers
44
45
 
45
46
  desc "`assert_not_same`"
46
- setup do
47
- klass = Class.new; object = klass.new
48
- desc = @desc = "assert not same fail desc"
49
- args = @args = [object, object, desc]
50
- @test = Factory.test do
47
+ subject {
48
+ args = args1
49
+ object = object1
50
+ klass = class1
51
+ Factory.test do
51
52
  assert_not_same(*args) # fail
52
53
  assert_not_same(object, klass.new) # pass
53
54
  end
54
- @c = @test.config
55
- @test.run(&test_run_callback)
56
- end
57
- subject{ @test }
55
+ }
58
56
 
59
- should "produce results as expected" do
60
- assert_equal 2, test_run_result_count
61
- assert_equal 1, test_run_result_count(:pass)
62
- assert_equal 1, test_run_result_count(:fail)
63
- end
57
+ let(:class1) { Class.new }
58
+ let(:object1) { class1.new }
59
+ let(:desc1) { "assert not same fail desc" }
60
+ let(:args1) { [object1, object1, desc1] }
61
+ let(:config1) { subject.config }
64
62
 
65
- should "have a fail message with custom and generic explanations" do
66
- exp = "#{@args[2]}\n"\
67
- "Expected #{Assert::U.show(@args[1], @c)}"\
68
- " (#<#{@args[1].class}:#{"0x0%x" % (@args[1].object_id << 1)}>)"\
69
- " to not be the same as #{Assert::U.show(@args[0], @c)}"\
70
- " (#<#{@args[0].class}:#{"0x0%x" % (@args[0].object_id << 1)}>)."
71
- assert_equal exp, test_run_results(:fail).first.message
63
+ should "produce results as expected" do
64
+ subject.run(&test_run_callback)
65
+
66
+ assert_that(test_run_result_count).equals(2)
67
+ assert_that(test_run_result_count(:pass)).equals(1)
68
+ assert_that(test_run_result_count(:fail)).equals(1)
69
+
70
+ exp =
71
+ "#{args1[2]}\n"\
72
+ "Expected #{Assert::U.show(args1[1], config1)}"\
73
+ " (#<#{args1[1].class}:#{"0x0%x" % (args1[1].object_id << 1)}>)"\
74
+ " to not be the same as #{Assert::U.show(args1[0], config1)}"\
75
+ " (#<#{args1[0].class}:#{"0x0%x" % (args1[0].object_id << 1)}>)."
76
+ assert_that(test_run_results(:fail).first.message).equals(exp)
72
77
  end
73
-
74
78
  end
75
79
 
76
80
  class DiffTests < Assert::Context
77
81
  include Assert::Test::TestHelpers
78
82
 
79
83
  desc "with objects that should use diff when showing"
80
- setup do
81
- @exp_obj = "I'm a\nstring"
82
- @act_obj = "I am a \nstring"
83
-
84
- @c = Factory.modes_off_config
85
- @c.use_diff_proc(Assert::U.default_use_diff_proc)
86
- @c.run_diff_proc(Assert::U.syscmd_diff_proc)
87
-
88
- @exp_obj_show = Assert::U.show_for_diff(@exp_obj, @c)
89
- @act_obj_show = Assert::U.show_for_diff(@act_obj, @c)
90
- end
84
+ let(:config1) {
85
+ Factory.modes_off_config.tap do |config|
86
+ config.use_diff_proc(Assert::U.default_use_diff_proc)
87
+ config.run_diff_proc(Assert::U.syscmd_diff_proc)
88
+ end
89
+ }
91
90
 
91
+ let(:exp_obj1) { "I'm a\nstring" }
92
+ let(:act_obj1) { "I am a \nstring" }
93
+ let(:exp_obj_show1) { Assert::U.show_for_diff(exp_obj1, config1) }
94
+ let(:act_obj_show1) { Assert::U.show_for_diff(act_obj1, config1) }
92
95
  end
93
96
 
94
97
  class AssertSameDiffTests < DiffTests
95
98
  desc "`assert_same`"
96
- setup do
97
- exp_obj, act_obj = @exp_obj, @act_obj
98
- @test = Factory.test(@c) do
99
+ subject {
100
+ exp_obj, act_obj = exp_obj1, act_obj1
101
+ Factory.test(config1) do
99
102
  assert_same(exp_obj, act_obj)
100
103
  end
101
- @test.run(&test_run_callback)
102
- end
103
- subject{ @test }
104
+ }
104
105
 
105
106
  should "include diff output in the fail messages" do
106
- exp = "Expected #<#{@act_obj.class}:#{"0x0%x" % (@act_obj.object_id << 1)}>"\
107
- " to be the same as"\
108
- " #<#{@exp_obj.class}:#{"0x0%x" % (@exp_obj.object_id << 1)}>"\
109
- ", diff:\n"\
110
- "#{Assert::U.syscmd_diff_proc.call(@exp_obj_show, @act_obj_show)}"
111
- assert_equal exp, test_run_results(:fail).first.message
107
+ subject.run(&test_run_callback)
108
+
109
+ exp =
110
+ "Expected #<#{act_obj1.class}:#{"0x0%x" % (act_obj1.object_id << 1)}>"\
111
+ " to be the same as"\
112
+ " #<#{exp_obj1.class}:#{"0x0%x" % (exp_obj1.object_id << 1)}>"\
113
+ ", diff:\n"\
114
+ "#{Assert::U.syscmd_diff_proc.call(exp_obj_show1, act_obj_show1)}"
115
+ assert_that(test_run_results(:fail).first.message).equals(exp)
112
116
  end
113
-
114
117
  end
115
118
 
116
119
  class AssertNotSameDiffTests < DiffTests
117
120
  desc "`assert_not_same`"
118
- setup do
119
- @exp_obj = @act_obj
120
- @exp_obj_show = @act_obj_show
121
-
122
- exp_obj, act_obj = @exp_obj, @act_obj
123
- @test = Factory.test(@c) do
124
- assert_not_same(exp_obj, exp_obj)
121
+ subject {
122
+ act_obj = act_obj1
123
+ Factory.test(config1) do
124
+ assert_not_same(act_obj, act_obj)
125
125
  end
126
- @test.run(&test_run_callback)
127
- end
128
- subject{ @test }
126
+ }
129
127
 
130
128
  should "include diff output in the fail messages" do
131
- exp = "Expected #<#{@act_obj.class}:#{"0x0%x" % (@act_obj.object_id << 1)}>"\
132
- " to not be the same as"\
133
- " #<#{@exp_obj.class}:#{"0x0%x" % (@exp_obj.object_id << 1)}>"\
134
- ", diff:\n"\
135
- "#{Assert::U.syscmd_diff_proc.call(@exp_obj_show, @act_obj_show)}"
136
- assert_equal exp, test_run_results(:fail).first.message
129
+ subject.run(&test_run_callback)
130
+
131
+ exp =
132
+ "Expected #<#{act_obj1.class}:#{"0x0%x" % (act_obj1.object_id << 1)}>"\
133
+ " to not be the same as"\
134
+ " #<#{act_obj1.class}:#{"0x0%x" % (act_obj1.object_id << 1)}>"\
135
+ ", diff:\n"\
136
+ "#{Assert::U.syscmd_diff_proc.call(act_obj_show1, act_obj_show1)}"
137
+ assert_that(test_run_results(:fail).first.message).equals(exp)
137
138
  end
138
-
139
139
  end
140
-
141
140
  end
142
-