test-unit 3.3.3 → 3.3.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.
@@ -26,8 +26,8 @@ module Test
26
26
  # returned, making it very easy to use the proc
27
27
  # itself as the listener_key:
28
28
  #
29
- # listener = add_listener("Channel") { ... }
30
- # remove_listener("Channel", listener)
29
+ # listener = add_listener("Channel") { ... }
30
+ # remove_listener("Channel", listener)
31
31
  def add_listener(channel_name, listener_key=NOTHING, &listener) # :yields: value
32
32
  unless(block_given?)
33
33
  raise ArgumentError.new("No callback was passed as a listener")
@@ -7,10 +7,11 @@ module Test
7
7
  # error as string.
8
8
  #
9
9
  # Example:
10
- # capture_output do
11
- # puts("stdout")
12
- # warn("stderr")
13
- # end # -> ["stdout\n", "stderr\n"]
10
+ #
11
+ # capture_output do
12
+ # puts("stdout")
13
+ # warn("stderr")
14
+ # end # -> ["stdout\n", "stderr\n"]
14
15
  def capture_output
15
16
  require 'stringio'
16
17
 
@@ -1,5 +1,5 @@
1
1
  module Test
2
2
  module Unit
3
- VERSION = "3.3.3"
3
+ VERSION = "3.3.4"
4
4
  end
5
5
  end
@@ -289,14 +289,19 @@ EOM
289
289
  end
290
290
 
291
291
  def test_same_inspected_objects
292
- now = Time.now
293
- now_without_usec = Time.at(now.to_i)
292
+ same_inspected_class = Class.new do
293
+ def inspect
294
+ "inspected"
295
+ end
296
+ end
297
+ object1 = same_inspected_class.new
298
+ object2 = same_inspected_class.new
294
299
  message = <<-EOM.chomp
295
- <#{now.inspect}> expected but was
296
- <#{now.inspect}>.
300
+ <inspected> expected but was
301
+ <inspected>.
297
302
  EOM
298
303
  check_fail(message) do
299
- assert_equal(now, now_without_usec)
304
+ assert_equal(object1, object2)
300
305
  end
301
306
  end
302
307
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test-unit
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.3
4
+ version: 3.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-05-10 00:00:00.000000000 Z
12
+ date: 2019-09-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: power_assert