[前][次][番号順一覧][スレッド一覧]

ruby-changes:62094

From: Marc-Andre <ko1@a...>
Date: Wed, 1 Jul 2020 18:51:20 +0900 (JST)
Subject: [ruby-changes:62094] fe10323a35 (master): [flori/json] Fix test that wasn't testing anything

https://git.ruby-lang.org/ruby.git/commit/?id=fe10323a35

From fe10323a35d20d7ab5d4291e23eb04fb3ef77a2b Mon Sep 17 00:00:00 2001
From: Marc-Andre Lafortune <github@m...>
Date: Thu, 25 Jun 2020 02:42:44 -0400
Subject: [flori/json] Fix test that wasn't testing anything

https://github.com/flori/json/commit/d5c6566b41

diff --git a/test/json/json_fixtures_test.rb b/test/json/json_fixtures_test.rb
index 01954fe..b2a1ec8 100644
--- a/test/json/json_fixtures_test.rb
+++ b/test/json/json_fixtures_test.rb
@@ -3,7 +3,7 @@ require 'test_helper' https://github.com/ruby/ruby/blob/trunk/test/json/json_fixtures_test.rb#L3
 
 class JSONFixturesTest < Test::Unit::TestCase
   def setup
-    fixtures = File.join(File.dirname(__FILE__), 'fixtures/{fail,pass}.json')
+    fixtures = File.join(File.dirname(__FILE__), 'fixtures/{fail,pass}*.json')
     passed, failed = Dir[fixtures].partition { |f| f['pass'] }
     @passed = passed.inject([]) { |a, f| a << [ f, File.read(f) ] }.sort
     @failed = failed.inject([]) { |a, f| a << [ f, File.read(f) ] }.sort
@@ -29,4 +29,9 @@ class JSONFixturesTest < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/json/json_fixtures_test.rb#L29
       end
     end
   end
+
+  def test_sanity
+    assert(@passed.size > 5)
+    assert(@failed.size > 20)
+  end
 end
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]