ruby-tdb user+dev discussion/patches/pulls/bugs/help
 help / color / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
						download: 
* [PATCH] test/test_tdb_mt.rb: fix fragile test
@ 2018-04-29 21:59 Eric Wong
  0 siblings, 0 replies; 1+ results
From: Eric Wong @ 2018-04-29 21:59 UTC (permalink / raw)
  To: ruby-tdb-public; +Cc: Eric Wong

Method#inspect has changed in modern Ruby, so try to make test
less fragile.
---
 test/test_tdb_mt.rb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/test/test_tdb_mt.rb b/test/test_tdb_mt.rb
index 781e2bd..7f8611c 100644
--- a/test/test_tdb_mt.rb
+++ b/test/test_tdb_mt.rb
@@ -90,7 +90,10 @@ class Test_TDB_MT < Test::Unit::TestCase
     @tdb = TDB.new(nil)
     respond_to?(:refute_match) and
       m.each { |meth| refute_match(/\bTDB::MT\b/, @tdb.method(meth).to_s) }
+    before = m.map { |meth| [ meth, @tdb.method(meth).to_s ] }
     @tdb.threadsafe!
-    m.each { |meth| assert_match(/\bTDB::MT\b/, @tdb.method(meth).to_s) }
+    before.each do |(meth, old)|
+      refute_equal old, @tdb.method(meth).to_s
+    end
   end
 end
-- 
EW


^ permalink raw reply	[relevance 7%]

Results 1-1 of 1 | reverse results
2018-04-29 21:59 [PATCH] test/test_tdb_mt.rb: fix fragile test Eric Wong


ruby-tdb user+dev discussion/patches/pulls/bugs/help

Archives are clonable:
	git clone --mirror https://bogomips.org/ruby-tdb-public
	git clone --mirror http://ou63pmih66umazou.onion/ruby-tdb-public

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.lang.ruby.tdb
	nntp://ou63pmih66umazou.onion/inbox.comp.lang.ruby.tdb

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git