assert 2.17.0 → 2.18.0

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 (75) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -2
  3. data/README.md +0 -4
  4. data/assert.gemspec +2 -3
  5. data/lib/assert.rb +0 -10
  6. data/lib/assert/assert_runner.rb +0 -3
  7. data/lib/assert/assertions.rb +0 -4
  8. data/lib/assert/cli.rb +30 -46
  9. data/lib/assert/config.rb +0 -4
  10. data/lib/assert/config_helpers.rb +0 -4
  11. data/lib/assert/context.rb +0 -2
  12. data/lib/assert/context/setup_dsl.rb +0 -4
  13. data/lib/assert/context/subject_dsl.rb +0 -4
  14. data/lib/assert/context/suite_dsl.rb +0 -4
  15. data/lib/assert/context/test_dsl.rb +0 -4
  16. data/lib/assert/context_info.rb +0 -4
  17. data/lib/assert/default_runner.rb +0 -4
  18. data/lib/assert/default_suite.rb +0 -5
  19. data/lib/assert/default_view.rb +0 -4
  20. data/lib/assert/factory.rb +0 -3
  21. data/lib/assert/file_line.rb +0 -4
  22. data/lib/assert/macro.rb +0 -3
  23. data/lib/assert/macros/methods.rb +0 -6
  24. data/lib/assert/result.rb +2 -17
  25. data/lib/assert/runner.rb +0 -3
  26. data/lib/assert/stub.rb +0 -2
  27. data/lib/assert/suite.rb +0 -4
  28. data/lib/assert/test.rb +2 -7
  29. data/lib/assert/utils.rb +0 -4
  30. data/lib/assert/version.rb +1 -1
  31. data/lib/assert/view.rb +0 -3
  32. data/lib/assert/view_helpers.rb +0 -11
  33. data/log/{.gitkeep → .keep} +0 -0
  34. data/test/helper.rb +0 -4
  35. data/test/support/factory.rb +0 -1
  36. data/test/support/inherited_stuff.rb +0 -2
  37. data/test/system/stub_tests.rb +0 -19
  38. data/test/system/test_tests.rb +0 -16
  39. data/test/unit/assert_tests.rb +0 -4
  40. data/test/unit/assertions/assert_block_tests.rb +0 -4
  41. data/test/unit/assertions/assert_empty_tests.rb +0 -3
  42. data/test/unit/assertions/assert_equal_tests.rb +0 -8
  43. data/test/unit/assertions/assert_file_exists_tests.rb +0 -3
  44. data/test/unit/assertions/assert_includes_tests.rb +0 -4
  45. data/test/unit/assertions/assert_instance_of_tests.rb +0 -4
  46. data/test/unit/assertions/assert_kind_of_tests.rb +0 -4
  47. data/test/unit/assertions/assert_match_tests.rb +0 -4
  48. data/test/unit/assertions/assert_nil_tests.rb +0 -4
  49. data/test/unit/assertions/assert_raises_tests.rb +2 -6
  50. data/test/unit/assertions/assert_respond_to_tests.rb +0 -4
  51. data/test/unit/assertions/assert_same_tests.rb +0 -7
  52. data/test/unit/assertions/assert_true_false_tests.rb +0 -6
  53. data/test/unit/assertions_tests.rb +0 -4
  54. data/test/unit/config_helpers_tests.rb +0 -3
  55. data/test/unit/config_tests.rb +0 -3
  56. data/test/unit/context/setup_dsl_tests.rb +0 -8
  57. data/test/unit/context/subject_dsl_tests.rb +0 -6
  58. data/test/unit/context/suite_dsl_tests.rb +0 -4
  59. data/test/unit/context/test_dsl_tests.rb +0 -3
  60. data/test/unit/context_info_tests.rb +0 -3
  61. data/test/unit/context_tests.rb +2 -18
  62. data/test/unit/default_runner_tests.rb +0 -3
  63. data/test/unit/default_suite_tests.rb +0 -3
  64. data/test/unit/factory_tests.rb +0 -3
  65. data/test/unit/file_line_tests.rb +0 -4
  66. data/test/unit/macro_tests.rb +0 -8
  67. data/test/unit/result_tests.rb +0 -13
  68. data/test/unit/runner_tests.rb +0 -7
  69. data/test/unit/suite_tests.rb +0 -4
  70. data/test/unit/test_tests.rb +0 -12
  71. data/test/unit/utils_tests.rb +0 -9
  72. data/test/unit/view_helpers_tests.rb +0 -6
  73. data/test/unit/view_tests.rb +0 -4
  74. metadata +8 -9
  75. data/tmp/.gitkeep +0 -0
@@ -7,7 +7,6 @@ class Assert::Test
7
7
 
8
8
  desc "Assert::Test"
9
9
  subject{ @test }
10
-
11
10
  end
12
11
 
13
12
  class NoResultsTests < SystemTests
@@ -20,7 +19,6 @@ class Assert::Test
20
19
  should "generate 0 results" do
21
20
  assert_equal 0, test_run_result_count
22
21
  end
23
-
24
22
  end
25
23
 
26
24
  class PassTests < SystemTests
@@ -37,7 +35,6 @@ class Assert::Test
37
35
  should "generate 1 pass result" do
38
36
  assert_equal 1, test_run_result_count(:pass)
39
37
  end
40
-
41
38
  end
42
39
 
43
40
  class FailTests < SystemTests
@@ -54,7 +51,6 @@ class Assert::Test
54
51
  should "generate 1 fail result" do
55
52
  assert_equal 1, test_run_result_count(:fail)
56
53
  end
57
-
58
54
  end
59
55
 
60
56
  class SkipTests < SystemTests
@@ -71,7 +67,6 @@ class Assert::Test
71
67
  should "generate 1 skip result" do
72
68
  assert_equal 1, test_run_result_count(:skip)
73
69
  end
74
-
75
70
  end
76
71
 
77
72
  class ErrorTests < SystemTests
@@ -88,7 +83,6 @@ class Assert::Test
88
83
  should "generate 1 error result" do
89
84
  assert_equal 1, test_run_result_count(:error)
90
85
  end
91
-
92
86
  end
93
87
 
94
88
  class MixedTests < SystemTests
@@ -112,7 +106,6 @@ class Assert::Test
112
106
  should "generate 1 fail result" do
113
107
  assert_equal 1, test_run_result_count(:fail)
114
108
  end
115
-
116
109
  end
117
110
 
118
111
  class MixedSkipTests < SystemTests
@@ -145,7 +138,6 @@ class Assert::Test
145
138
  should "generate 0 fail results" do
146
139
  assert_equal 0, test_run_result_count(:fail)
147
140
  end
148
-
149
141
  end
150
142
 
151
143
  class MixedErrorTests < SystemTests
@@ -178,7 +170,6 @@ class Assert::Test
178
170
  should "generate 0 fail results" do
179
171
  assert_equal 0, test_run_result_count(:fail)
180
172
  end
181
-
182
173
  end
183
174
 
184
175
  class MixedPassTests < SystemTests
@@ -207,7 +198,6 @@ class Assert::Test
207
198
  should "generate 1 fail result" do
208
199
  assert_equal 1, test_run_result_count(:fail)
209
200
  end
210
-
211
201
  end
212
202
 
213
203
  class MixedFailTests < SystemTests
@@ -236,7 +226,6 @@ class Assert::Test
236
226
  should "generate 2 fail results" do
237
227
  assert_equal 2, test_run_result_count(:fail)
238
228
  end
239
-
240
229
  end
241
230
 
242
231
  class MixedFlunkTests < SystemTests
@@ -265,7 +254,6 @@ class Assert::Test
265
254
  should "generate 2 fail results" do
266
255
  assert_equal 2, test_run_result_count(:fail)
267
256
  end
268
-
269
257
  end
270
258
 
271
259
  class WithSetupsTests < SystemTests
@@ -287,7 +275,6 @@ class Assert::Test
287
275
  exp = ["assert style setup", "test/unit style setup", "TEST"]
288
276
  assert_equal exp, test_run_result_messages
289
277
  end
290
-
291
278
  end
292
279
 
293
280
  class WithTeardownsTests < SystemTests
@@ -309,7 +296,6 @@ class Assert::Test
309
296
  exp = ["TEST", "assert style teardown", "test/unit style teardown"]
310
297
  assert_equal exp, test_run_result_messages
311
298
  end
312
-
313
299
  end
314
300
 
315
301
  class WithAroundsTests < SystemTests
@@ -355,7 +341,5 @@ class Assert::Test
355
341
  ]
356
342
  assert_equal exp, test_run_result_messages
357
343
  end
358
-
359
344
  end
360
-
361
345
  end
@@ -5,7 +5,6 @@ require "assert/stub"
5
5
  require "much-stub"
6
6
 
7
7
  module Assert
8
-
9
8
  class UnitTests < Assert::Context
10
9
  desc "Assert"
11
10
  subject { Assert }
@@ -25,7 +24,6 @@ module Assert
25
24
 
26
25
  # Note: don't really need to explicitly test the configure method as
27
26
  # nothing runs if it isn't working
28
-
29
27
  end
30
28
 
31
29
  class StubTests < UnitTests
@@ -106,7 +104,5 @@ module Assert
106
104
  assert_equal @stub_value, @myobj.mymeth
107
105
  assert_equal @orig_value, Assert.stub_send(@myobj, :mymeth)
108
106
  end
109
-
110
107
  end
111
-
112
108
  end
@@ -2,7 +2,6 @@ require "assert"
2
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
 
@@ -27,7 +26,6 @@ module Assert::Assertions
27
26
  exp = "#{@desc}\nExpected block to return a true value."
28
27
  assert_equal exp, test_run_results(:fail).first.message
29
28
  end
30
-
31
29
  end
32
30
 
33
31
  class AssertNotBlockTests < Assert::Context
@@ -54,8 +52,6 @@ module Assert::Assertions
54
52
  exp = "#{@desc}\nExpected block to not return a true value."
55
53
  assert_equal exp, test_run_results(:fail).first.message
56
54
  end
57
-
58
55
  end
59
-
60
56
  end
61
57
 
@@ -4,7 +4,6 @@ require "assert/assertions"
4
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
 
@@ -60,7 +59,5 @@ module Assert::Assertions
60
59
  exp = "#{@args[1]}\nExpected #{Assert::U.show(@args[0], @c)} to not be empty."
61
60
  assert_equal exp, test_run_results(:fail).first.message
62
61
  end
63
-
64
62
  end
65
-
66
63
  end
@@ -4,7 +4,6 @@ require "assert/assertions"
4
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
 
@@ -32,7 +31,6 @@ module Assert::Assertions
32
31
  " to be equal to #{Assert::U.show(@a[0], @c)}."
33
32
  assert_equal exp, test_run_results(:fail).first.message
34
33
  end
35
-
36
34
  end
37
35
 
38
36
  class AssertNotEqualTests < Assert::Context
@@ -62,7 +60,6 @@ module Assert::Assertions
62
60
  " to not be equal to #{Assert::U.show(@a[0], @c)}."
63
61
  assert_equal exp, test_run_results(:fail).first.message
64
62
  end
65
-
66
63
  end
67
64
 
68
65
  class EqualOrderTests < Assert::Context
@@ -85,7 +82,6 @@ module Assert::Assertions
85
82
  assert_equal @is, @is_not
86
83
  assert_not_equal @is_not, @is
87
84
  end
88
-
89
85
  end
90
86
 
91
87
  class DiffTests < Assert::Context
@@ -103,7 +99,6 @@ module Assert::Assertions
103
99
  @exp_obj_show = Assert::U.show_for_diff(@exp_obj, @c)
104
100
  @act_obj_show = Assert::U.show_for_diff(@act_obj, @c)
105
101
  end
106
-
107
102
  end
108
103
 
109
104
  class AssertEqualDiffTests < DiffTests
@@ -122,7 +117,6 @@ module Assert::Assertions
122
117
  "#{Assert::U.syscmd_diff_proc.call(@exp_obj_show, @act_obj_show)}"
123
118
  assert_equal exp, test_run_results(:fail).first.message
124
119
  end
125
-
126
120
  end
127
121
 
128
122
  class AssertNotEqualDiffTests < DiffTests
@@ -141,7 +135,5 @@ module Assert::Assertions
141
135
  "#{Assert::U.syscmd_diff_proc.call(@exp_obj_show, @exp_obj_show)}"
142
136
  assert_equal exp, test_run_results(:fail).first.message
143
137
  end
144
-
145
138
  end
146
-
147
139
  end
@@ -31,7 +31,6 @@ module Assert::Assertions
31
31
  exp = "#{@args[1]}\nExpected #{Assert::U.show(@args[0], @c)} to exist."
32
32
  assert_equal exp, test_run_results(:fail).first.message
33
33
  end
34
-
35
34
  end
36
35
 
37
36
  class AssertNotFileExistsTests < Assert::Context
@@ -60,8 +59,6 @@ module Assert::Assertions
60
59
  exp = "#{@args[1]}\nExpected #{Assert::U.show(@args[0], @c)} to not exist."
61
60
  assert_equal exp, test_run_results(:fail).first.message
62
61
  end
63
-
64
62
  end
65
-
66
63
  end
67
64
 
@@ -4,7 +4,6 @@ require "assert/assertions"
4
4
  require "assert/utils"
5
5
 
6
6
  module Assert::Assertions
7
-
8
7
  class AssertIncludesTests < Assert::Context
9
8
  include Assert::Test::TestHelpers
10
9
 
@@ -33,7 +32,6 @@ module Assert::Assertions
33
32
  " to include #{Assert::U.show(@args[0], @c)}."
34
33
  assert_equal exp, test_run_results(:fail).first.message
35
34
  end
36
-
37
35
  end
38
36
 
39
37
  class AssertNotIncludedTests < Assert::Context
@@ -64,8 +62,6 @@ module Assert::Assertions
64
62
  " to not include #{Assert::U.show(@args[0], @c)}."
65
63
  assert_equal exp, test_run_results(:fail).first.message
66
64
  end
67
-
68
65
  end
69
-
70
66
  end
71
67
 
@@ -4,7 +4,6 @@ require "assert/assertions"
4
4
  require "assert/utils"
5
5
 
6
6
  module Assert::Assertions
7
-
8
7
  class AssertInstanceOfTests < Assert::Context
9
8
  include Assert::Test::TestHelpers
10
9
 
@@ -32,7 +31,6 @@ module Assert::Assertions
32
31
  " to be an instance of #{@args[0]}."
33
32
  assert_equal exp, test_run_results(:fail).first.message
34
33
  end
35
-
36
34
  end
37
35
 
38
36
  class AssertNotInstanceOfTests < Assert::Context
@@ -62,8 +60,6 @@ module Assert::Assertions
62
60
  " to not be an instance of #{@args[0]}."
63
61
  assert_equal exp, test_run_results(:fail).first.message
64
62
  end
65
-
66
63
  end
67
-
68
64
  end
69
65
 
@@ -4,7 +4,6 @@ require "assert/assertions"
4
4
  require "assert/utils"
5
5
 
6
6
  module Assert::Assertions
7
-
8
7
  class AssertKindOfTests < Assert::Context
9
8
  include Assert::Test::TestHelpers
10
9
 
@@ -32,7 +31,6 @@ module Assert::Assertions
32
31
  " to be a kind of #{@args[0]}."
33
32
  assert_equal exp, test_run_results(:fail).first.message
34
33
  end
35
-
36
34
  end
37
35
 
38
36
  class AssertNotKindOfTests < Assert::Context
@@ -62,8 +60,6 @@ module Assert::Assertions
62
60
  " to not be a kind of #{@args[0]}."
63
61
  assert_equal exp, test_run_results(:fail).first.message
64
62
  end
65
-
66
63
  end
67
-
68
64
  end
69
65
 
@@ -4,7 +4,6 @@ require "assert/assertions"
4
4
  require "assert/utils"
5
5
 
6
6
  module Assert::Assertions
7
-
8
7
  class AssertMatchTests < Assert::Context
9
8
  include Assert::Test::TestHelpers
10
9
 
@@ -32,7 +31,6 @@ module Assert::Assertions
32
31
  " to match #{Assert::U.show(@args[0], @c)}."
33
32
  assert_equal exp, test_run_results(:fail).first.message
34
33
  end
35
-
36
34
  end
37
35
 
38
36
  class AssertNotMatchTests < Assert::Context
@@ -62,8 +60,6 @@ module Assert::Assertions
62
60
  " to not match #{Assert::U.show(@args[0], @c)}."
63
61
  assert_equal exp, test_run_results(:fail).first.message
64
62
  end
65
-
66
63
  end
67
-
68
64
  end
69
65
 
@@ -4,7 +4,6 @@ require "assert/assertions"
4
4
  require "assert/utils"
5
5
 
6
6
  module Assert::Assertions
7
-
8
7
  class AssertNilTests < Assert::Context
9
8
  include Assert::Test::TestHelpers
10
9
 
@@ -31,7 +30,6 @@ module Assert::Assertions
31
30
  exp = "#{@args[1]}\nExpected #{Assert::U.show(@args[0], @c)} to be nil."
32
31
  assert_equal exp, test_run_results(:fail).first.message
33
32
  end
34
-
35
33
  end
36
34
 
37
35
  class AssertNotNilTests < Assert::Context
@@ -60,8 +58,6 @@ module Assert::Assertions
60
58
  exp = "#{@args[1]}\nExpected #{Assert::U.show(@args[0], @c)} to not be nil."
61
59
  assert_equal exp, test_run_results(:fail).first.message
62
60
  end
63
-
64
61
  end
65
-
66
62
  end
67
63
 
@@ -2,7 +2,6 @@ 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
 
@@ -34,7 +33,7 @@ module Assert::Assertions
34
33
  "#{@d}\nAn exception expected but nothing raised."
35
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_match(/^#{exp[n]}/, msg) }
38
37
  end
39
38
 
40
39
  should "return any raised exception instance" do
@@ -56,7 +55,6 @@ module Assert::Assertions
56
55
 
57
56
  assert_nil error
58
57
  end
59
-
60
58
  end
61
59
 
62
60
  class AssertNothingRaisedTests < Assert::Context
@@ -88,10 +86,8 @@ module Assert::Assertions
88
86
  "#{@d}\nAn exception not expected, but raised:"
89
87
  ]
90
88
  messages = test_run_results(:fail).map(&:message)
91
- messages.each_with_index{ |msg, n| assert_match /^#{exp[n]}/, msg }
89
+ messages.each_with_index{ |msg, n| assert_match(/^#{exp[n]}/, msg) }
92
90
  end
93
-
94
91
  end
95
-
96
92
  end
97
93
 
@@ -4,7 +4,6 @@ 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
 
@@ -33,7 +32,6 @@ module Assert::Assertions
33
32
  " to respond to `#{@args[0]}`."
34
33
  assert_equal exp, test_run_results(:fail).first.message
35
34
  end
36
-
37
35
  end
38
36
 
39
37
  class AssertNotRespondToTests < Assert::Context
@@ -64,8 +62,6 @@ module Assert::Assertions
64
62
  " to not respond to `#{@args[0]}`."
65
63
  assert_equal exp, test_run_results(:fail).first.message
66
64
  end
67
-
68
65
  end
69
-
70
66
  end
71
67
 
@@ -4,7 +4,6 @@ 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
 
@@ -36,7 +35,6 @@ module Assert::Assertions
36
35
  " (#<#{@args[0].class}:#{"0x0%x" % (@args[0].object_id << 1)}>)."
37
36
  assert_equal exp, test_run_results(:fail).first.message
38
37
  end
39
-
40
38
  end
41
39
 
42
40
  class AssertNotSameTests < Assert::Context
@@ -70,7 +68,6 @@ module Assert::Assertions
70
68
  " (#<#{@args[0].class}:#{"0x0%x" % (@args[0].object_id << 1)}>)."
71
69
  assert_equal exp, test_run_results(:fail).first.message
72
70
  end
73
-
74
71
  end
75
72
 
76
73
  class DiffTests < Assert::Context
@@ -88,7 +85,6 @@ module Assert::Assertions
88
85
  @exp_obj_show = Assert::U.show_for_diff(@exp_obj, @c)
89
86
  @act_obj_show = Assert::U.show_for_diff(@act_obj, @c)
90
87
  end
91
-
92
88
  end
93
89
 
94
90
  class AssertSameDiffTests < DiffTests
@@ -110,7 +106,6 @@ module Assert::Assertions
110
106
  "#{Assert::U.syscmd_diff_proc.call(@exp_obj_show, @act_obj_show)}"
111
107
  assert_equal exp, test_run_results(:fail).first.message
112
108
  end
113
-
114
109
  end
115
110
 
116
111
  class AssertNotSameDiffTests < DiffTests
@@ -135,8 +130,6 @@ module Assert::Assertions
135
130
  "#{Assert::U.syscmd_diff_proc.call(@exp_obj_show, @act_obj_show)}"
136
131
  assert_equal exp, test_run_results(:fail).first.message
137
132
  end
138
-
139
133
  end
140
-
141
134
  end
142
135