[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/8] test/*.rb: test/unit compatibility
From: |
Eric Wong |
Subject: |
[PATCH 2/8] test/*.rb: test/unit compatibility |
Date: |
Sat, 7 Sep 2013 20:03:21 +0000 |
assert() in test/unit does not automatically stringify the failure
message, unlike minitest. I don't have a strong opinion regarding
minitest and test/unit, but the deprecation notices in minitest 5
are annoying, so perhaps using Test::Unit via minitest shim is a
better way to go.
---
test/player_integration.rb | 2 +-
test/test_rg_integration.rb | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/test/player_integration.rb b/test/player_integration.rb
index 8ff1be2..5ca3e43 100644
--- a/test/player_integration.rb
+++ b/test/player_integration.rb
@@ -92,7 +92,7 @@ module PlayerIntegration
def tmp_noise(len = 5)
noise = Tempfile.open(%w(junk .sox))
cmd = %W(sox -R -n -r44100 -c2 #{noise.path} synth #{len} pluck)
- assert system(*cmd), cmd
+ assert system(*cmd), cmd.inspect
[ noise, len ]
end
diff --git a/test/test_rg_integration.rb b/test/test_rg_integration.rb
index 23fd5d6..5c570ad 100644
--- a/test/test_rg_integration.rb
+++ b/test/test_rg_integration.rb
@@ -7,14 +7,14 @@ class TestRgIntegration < Minitest::Unit::TestCase
def tmp_pluck(len = 5)
pluck = Tempfile.open(%w(pluck .flac))
cmd = %W(sox -R -n -r44100 -c2 -C0 #{pluck.path} synth #{len} pluck)
- assert system(*cmd), cmd
+ assert system(*cmd), cmd.inspect
cmd = %W(metaflac
--set-tag=REPLAYGAIN_TRACK_GAIN=-2
--set-tag=REPLAYGAIN_ALBUM_GAIN=-3.0
--set-tag=REPLAYGAIN_TRACK_PEAK=0.666
--set-tag=REPLAYGAIN_ALBUM_PEAK=0.999
#{pluck.path})
- assert system(*cmd), cmd
+ assert system(*cmd), cmd.inspect
[ pluck, len ]
end
--
1.8.4
- [PATCH 0/8] latest changes in dtas.git (dtas-splitfx), Eric Wong, 2013/09/07
- [PATCH 4/8] test/*: compatibility class for both minitest 4 and 5, Eric Wong, 2013/09/07
- [PATCH 8/8] add dtas-splitfx - .cuesheets + make(1), Eric Wong, 2013/09/07
- [PATCH 1/8] source/sox: correctly extend xs for try_to_fail_harder, Eric Wong, 2013/09/07
- [PATCH 5/8] test/helper: delay at_exit registration for tmpfifo, Eric Wong, 2013/09/07
- [PATCH 3/8] test/player_integration: thread-safety fix, Eric Wong, 2013/09/07
- [PATCH 2/8] test/*.rb: test/unit compatibility,
Eric Wong <=
- [PATCH 6/8] dtas-console: show paused track when paused, Eric Wong, 2013/09/07
- [PATCH 7/8] test/helper: fix var shadowing, Eric Wong, 2013/09/07