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