assert 2.17.0 → 2.18.0

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -2,7 +2,6 @@ require "assert"
2
2
  require "assert/macro"
3
3
 
4
4
  class Assert::Macro
5
-
6
5
  class UnitTests < Assert::Context
7
6
  desc "Assert::Macro"
8
7
  setup do
@@ -30,7 +29,6 @@ class Assert::Macro
30
29
  should "complain if you create a macro without a block" do
31
30
  assert_raises(ArgumentError) { Assert::Macro.new }
32
31
  end
33
-
34
32
  end
35
33
 
36
34
  class InstanceMethodsTests < Assert::Context
@@ -51,7 +49,6 @@ class Assert::Macro
51
49
  should not_have_instance_methods :method_8, :method_9
52
50
  should not_have_imeth :method_10
53
51
  should not_have_imeths :method_11, :method_12
54
-
55
52
  end
56
53
 
57
54
  class ClassMethodsTests < Assert::Context
@@ -74,7 +71,6 @@ class Assert::Macro
74
71
  should not_have_class_methods :method_8, :method_9
75
72
  should not_have_cmeth :method_10
76
73
  should not_have_cmeths :method_11, :method_12
77
-
78
74
  end
79
75
 
80
76
  class ReadersTests < Assert::Context
@@ -95,7 +91,6 @@ class Assert::Macro
95
91
  should not_have_reader :method_8, :method_9
96
92
  should not_have_readers :method_10
97
93
  should not_have_readers :method_11, :method_12
98
-
99
94
  end
100
95
 
101
96
  class WritersTests < Assert::Context
@@ -116,7 +111,6 @@ class Assert::Macro
116
111
  should not_have_writer :method_8, :method_9
117
112
  should not_have_writers :method_10
118
113
  should not_have_writers :method_11, :method_12
119
-
120
114
  end
121
115
 
122
116
  class AccessorsTests < Assert::Context
@@ -137,7 +131,5 @@ class Assert::Macro
137
131
  should not_have_accessor :method_8, :method_9
138
132
  should not_have_accessors :method_10
139
133
  should not_have_accessors :method_11, :method_12
140
-
141
134
  end
142
-
143
135
  end
@@ -4,7 +4,6 @@ require "assert/result"
4
4
  require "assert/file_line"
5
5
 
6
6
  module Assert::Result
7
-
8
7
  class UnitTests < Assert::Context
9
8
  desc "Assert::Result"
10
9
  setup do
@@ -39,7 +38,6 @@ module Assert::Result
39
38
  assert_lib_path = File.join(ROOT_PATH, "lib/#{Factory.string}:#{Factory.integer}")
40
39
  (Factory.integer(3).times.map{ Factory.string } + [assert_lib_path]).shuffle
41
40
  end
42
-
43
41
  end
44
42
 
45
43
  class BaseTests < UnitTests
@@ -233,7 +231,6 @@ module Assert::Result
233
231
  "@test_file_line=#{subject.test_file_line.to_s.inspect}>"
234
232
  assert_equal exp, subject.inspect
235
233
  end
236
-
237
234
  end
238
235
 
239
236
  class PassTests < UnitTests
@@ -248,7 +245,6 @@ module Assert::Result
248
245
  assert_equal :pass, subject.class.type
249
246
  assert_equal "Pass", subject.class.name
250
247
  end
251
-
252
248
  end
253
249
 
254
250
  class IgnoreTests < UnitTests
@@ -263,7 +259,6 @@ module Assert::Result
263
259
  assert_equal :ignore, subject.class.type
264
260
  assert_equal "Ignore", subject.class.name
265
261
  end
266
-
267
262
  end
268
263
 
269
264
  class HaltingTestResultErrorTests < UnitTests
@@ -275,7 +270,6 @@ module Assert::Result
275
270
  should "be a runtime error" do
276
271
  assert_kind_of RuntimeError, subject
277
272
  end
278
-
279
273
  end
280
274
 
281
275
  class TestFailureTests < UnitTests
@@ -285,7 +279,6 @@ module Assert::Result
285
279
  should "be a halting test result error" do
286
280
  assert_kind_of HaltingTestResultError, subject.new
287
281
  end
288
-
289
282
  end
290
283
 
291
284
  class FailTests < UnitTests
@@ -326,7 +319,6 @@ module Assert::Result
326
319
  should "not allow creating for a test with non-TestFailure exceptions" do
327
320
  assert_raises(ArgumentError){ Fail.for_test(@test, RuntimeError.new) }
328
321
  end
329
-
330
322
  end
331
323
 
332
324
  class TestSkippedTests < UnitTests
@@ -336,7 +328,6 @@ module Assert::Result
336
328
  should "be a halting test result error" do
337
329
  assert_kind_of HaltingTestResultError, subject.new
338
330
  end
339
-
340
331
  end
341
332
 
342
333
  class SkipTests < UnitTests
@@ -377,7 +368,6 @@ module Assert::Result
377
368
  should "not allow creating for a test with non-TestSkipped exceptions" do
378
369
  assert_raises(ArgumentError){ Skip.for_test(@test, RuntimeError.new) }
379
370
  end
380
-
381
371
  end
382
372
 
383
373
  class ErrorTests < UnitTests
@@ -408,7 +398,6 @@ module Assert::Result
408
398
  should "not allow creating for a test without an exception" do
409
399
  assert_raises(ArgumentError){ Error.for_test(@test, Factory.string) }
410
400
  end
411
-
412
401
  end
413
402
 
414
403
  class BacktraceTests < UnitTests
@@ -444,7 +433,5 @@ module Assert::Result
444
433
  should "default itself when created from nil" do
445
434
  assert_equal ["No backtrace"], Backtrace.new
446
435
  end
447
-
448
436
  end
449
-
450
437
  end
@@ -8,7 +8,6 @@ require "assert/result"
8
8
  require "assert/view"
9
9
 
10
10
  class Assert::Runner
11
-
12
11
  class UnitTests < Assert::Context
13
12
  desc "Assert::Runner"
14
13
  subject{ Assert::Runner }
@@ -16,7 +15,6 @@ class Assert::Runner
16
15
  should "include the config helpers" do
17
16
  assert_includes Assert::ConfigHelpers, subject
18
17
  end
19
-
20
18
  end
21
19
 
22
20
  class InitTests < UnitTests
@@ -43,13 +41,11 @@ class Assert::Runner
43
41
  should "override the config helper's runner value with itself" do
44
42
  assert_equal subject, subject.runner
45
43
  end
46
-
47
44
  end
48
45
 
49
46
  class RunTests < InitTests
50
47
  desc "and run"
51
48
  setup do
52
- callback_mixin = Module.new
53
49
  @runner_class = Class.new(Assert::Runner) do
54
50
  include CallbackMixin
55
51
  end
@@ -150,7 +146,6 @@ class Assert::Runner
150
146
  "seeded with \"#{subject.runner_seed}\"\n"
151
147
  assert_includes exp, @view_output
152
148
  end
153
-
154
149
  end
155
150
 
156
151
  module CallbackMixin
@@ -179,7 +174,5 @@ class Assert::Runner
179
174
  def on_finish
180
175
  @on_finish_called = true
181
176
  end
182
-
183
177
  end
184
-
185
178
  end
@@ -19,7 +19,6 @@ class Assert::Suite
19
19
  assert_match "test#{Factory.string}", subject::TEST_METHOD_REGEX
20
20
  assert_not_match "#{Factory.string}test", subject::TEST_METHOD_REGEX
21
21
  end
22
-
23
22
  end
24
23
 
25
24
  class InitTests < UnitTests
@@ -103,7 +102,6 @@ class Assert::Suite
103
102
  subject.teardowns.each(&:call)
104
103
  assert_equal "teardowns have been run", status
105
104
  end
106
-
107
105
  end
108
106
 
109
107
  class WithTestsLoadedTests < InitTests
@@ -142,7 +140,5 @@ class Assert::Suite
142
140
  assert_kind_of Assert::Test, sorted_tests.first
143
141
  assert_same sorted_tests.first, subject.sorted_tests_to_run{ 1 }.first
144
142
  end
145
-
146
143
  end
147
-
148
144
  end
@@ -6,7 +6,6 @@ require "assert/file_line"
6
6
  require "assert/result"
7
7
 
8
8
  class Assert::Test
9
-
10
9
  class UnitTests < Assert::Context
11
10
  desc "Assert::Test"
12
11
  setup do
@@ -66,7 +65,6 @@ class Assert::Test
66
65
  def a_test_method
67
66
  @a_test_method_called = true
68
67
  end
69
-
70
68
  end
71
69
 
72
70
  class InitWithDataTests < UnitTests
@@ -134,7 +132,6 @@ class Assert::Test
134
132
  exp = "#<#{subject.class}:#{"0x0%x" % (subject.object_id << 1)} #{attrs}>"
135
133
  assert_equal exp, subject.inspect
136
134
  end
137
-
138
135
  end
139
136
 
140
137
  class PassFailIgnoreHandlingTests < UnitTests
@@ -187,7 +184,6 @@ class Assert::Test
187
184
  assert_kind_of Assert::Result::Ignore, result
188
185
  end
189
186
  end
190
-
191
187
  end
192
188
 
193
189
  class FailHandlingTests < UnitTests
@@ -230,7 +226,6 @@ class Assert::Test
230
226
  end
231
227
  end
232
228
  end
233
-
234
229
  end
235
230
 
236
231
  class SkipHandlingTests < UnitTests
@@ -269,7 +264,6 @@ class Assert::Test
269
264
  end
270
265
  end
271
266
  end
272
-
273
267
  end
274
268
 
275
269
  class ErrorHandlingTests < UnitTests
@@ -310,7 +304,6 @@ class Assert::Test
310
304
  end
311
305
  end
312
306
  end
313
-
314
307
  end
315
308
 
316
309
  class SignalExceptionHandlingTests < UnitTests
@@ -336,7 +329,6 @@ class Assert::Test
336
329
 
337
330
  assert_raises(SignalException){ test.run }
338
331
  end
339
-
340
332
  end
341
333
 
342
334
  class ComparingTests < UnitTests
@@ -360,7 +352,6 @@ class Assert::Test
360
352
  result = @test <=> Factory.test("zzz")
361
353
  assert_equal(-1, result)
362
354
  end
363
-
364
355
  end
365
356
 
366
357
  class CaptureOutTests < UnitTests
@@ -377,7 +368,6 @@ class Assert::Test
377
368
  @test.run
378
369
  assert_equal "std out from the test\n", @test.output
379
370
  end
380
-
381
371
  end
382
372
 
383
373
  class FullCaptureOutTests < CaptureOutTests
@@ -403,7 +393,5 @@ class Assert::Test
403
393
  "std out from the teardown\n"
404
394
  assert_equal(exp_out, @test.output)
405
395
  end
406
-
407
396
  end
408
-
409
397
  end
@@ -5,7 +5,6 @@ require "tempfile"
5
5
  require "assert/config"
6
6
 
7
7
  module Assert::Utils
8
-
9
8
  class UnitTests < Assert::Context
10
9
  desc "Assert::Utils"
11
10
  subject{ Assert::Utils }
@@ -17,7 +16,6 @@ module Assert::Utils
17
16
  should have_imeths :tempfile
18
17
  should have_imeths :stdlib_pp_proc, :default_use_diff_proc, :syscmd_diff_proc
19
18
  should have_imeths :git_changed_proc
20
-
21
19
  end
22
20
 
23
21
  class ShowTests < UnitTests
@@ -40,7 +38,6 @@ module Assert::Utils
40
38
  assert_equal @pp_config.pp_proc.call(obj), subject.show(obj, @pp_config)
41
39
  end
42
40
  end
43
-
44
41
  end
45
42
 
46
43
  class ShowForDiffTests < ShowTests
@@ -59,7 +56,6 @@ module Assert::Utils
59
56
  exp_out = "#<#<Class:0xXXXXXX>:0xXXXXXX>"
60
57
  assert_equal exp_out, subject.show_for_diff(@w_obj_id, Factory.modes_off_config)
61
58
  end
62
-
63
59
  end
64
60
 
65
61
  class TempfileTests < UnitTests
@@ -75,7 +71,6 @@ module Assert::Utils
75
71
  assert_equal "some-content\n", tmpfile.read
76
72
  end
77
73
  end
78
-
79
74
  end
80
75
 
81
76
  class StdlibPpProcTests < UnitTests
@@ -91,7 +86,6 @@ module Assert::Utils
91
86
  act_obj_pps = @objs.map{ |o| subject.stdlib_pp_proc(cust_width).call(o) }
92
87
  assert_equal exp_obj_pps, act_obj_pps
93
88
  end
94
-
95
89
  end
96
90
 
97
91
  class DefaultUseDiffProcTests < UnitTests
@@ -111,7 +105,6 @@ module Assert::Utils
111
105
  assert proc.call("", @newlines)
112
106
  assert proc.call(@longer, @newlines)
113
107
  end
114
-
115
108
  end
116
109
 
117
110
  class SyscmdDiffProc < UnitTests
@@ -142,7 +135,5 @@ module Assert::Utils
142
135
 
143
136
  assert_equal exp_diff_out, subject.syscmd_diff_proc(cust_syscmd).call(@diff_a, @diff_b)
144
137
  end
145
-
146
138
  end
147
-
148
139
  end
@@ -8,7 +8,6 @@ require "assert/result"
8
8
  require "assert/view"
9
9
 
10
10
  module Assert::ViewHelpers
11
-
12
11
  class UnitTests < Assert::Context
13
12
  desc "Assert::ViewHelpers"
14
13
  setup do
@@ -45,7 +44,6 @@ module Assert::ViewHelpers
45
44
  helpers.test_opt new_val, other_val
46
45
  assert_equal [new_val, other_val], helpers.test_opt
47
46
  end
48
-
49
47
  end
50
48
 
51
49
  class InitTests < UnitTests
@@ -132,7 +130,6 @@ module Assert::ViewHelpers
132
130
  exp = subject.to_sentence(items)
133
131
  assert_equal exp, subject.results_summary_sentence(&block)
134
132
  end
135
-
136
133
  end
137
134
 
138
135
  class AnsiTests < UnitTests
@@ -156,7 +153,6 @@ module Assert::ViewHelpers
156
153
  styles = []
157
154
  assert_equal "", subject.code_for(*styles)
158
155
  end
159
-
160
156
  end
161
157
 
162
158
  class AnsiInitTests < UnitTests
@@ -196,7 +192,5 @@ module Assert::ViewHelpers
196
192
  exp = exp_code + msg + Assert::ViewHelpers::Ansi.code_for(:reset)
197
193
  assert_equal exp, subject.ansi_styled_msg(msg, result_type)
198
194
  end
199
-
200
195
  end
201
-
202
196
  end
@@ -7,7 +7,6 @@ require "assert/suite"
7
7
  require "assert/view_helpers"
8
8
 
9
9
  class Assert::View
10
-
11
10
  class UnitTests < Assert::Context
12
11
  desc "Assert::View"
13
12
  subject { Assert::View }
@@ -21,7 +20,6 @@ class Assert::View
21
20
  should "include the view helpers" do
22
21
  assert_includes Assert::ViewHelpers, subject
23
22
  end
24
-
25
23
  end
26
24
 
27
25
  class InitTests < UnitTests
@@ -69,7 +67,5 @@ class Assert::View
69
67
  should "know if it is a tty" do
70
68
  assert_equal !!@io.isatty, subject.is_tty?
71
69
  end
72
-
73
70
  end
74
-
75
71
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: assert
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.17.0
4
+ version: 2.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kelly Redding
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-10-20 00:00:00.000000000 Z
12
+ date: 2019-12-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: much-factory
@@ -31,14 +31,14 @@ dependencies:
31
31
  requirements:
32
32
  - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: 0.1.0
34
+ version: 0.1.1
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: 0.1.0
41
+ version: 0.1.1
42
42
  description: Assertion style testing framework.
43
43
  email:
44
44
  - kelly@kellyredding.com
@@ -81,7 +81,7 @@ files:
81
81
  - lib/assert/version.rb
82
82
  - lib/assert/view.rb
83
83
  - lib/assert/view_helpers.rb
84
- - log/.gitkeep
84
+ - log/.keep
85
85
  - test/helper.rb
86
86
  - test/support/diff_a.txt
87
87
  - test/support/diff_b.txt
@@ -124,7 +124,6 @@ files:
124
124
  - test/unit/utils_tests.rb
125
125
  - test/unit/view_helpers_tests.rb
126
126
  - test/unit/view_tests.rb
127
- - tmp/.gitkeep
128
127
  homepage: http://github.com/redding/assert
129
128
  licenses:
130
129
  - MIT
@@ -135,9 +134,9 @@ require_paths:
135
134
  - lib
136
135
  required_ruby_version: !ruby/object:Gem::Requirement
137
136
  requirements:
138
- - - ">"
137
+ - - "~>"
139
138
  - !ruby/object:Gem::Version
140
- version: '1.8'
139
+ version: '2.4'
141
140
  required_rubygems_version: !ruby/object:Gem::Requirement
142
141
  requirements:
143
142
  - - ">="
@@ -145,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
144
  version: '0'
146
145
  requirements: []
147
146
  rubyforge_project:
148
- rubygems_version: 2.7.7
147
+ rubygems_version: 2.7.6.2
149
148
  signing_key:
150
149
  specification_version: 4
151
150
  summary: Assertion style testing framework.