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

ruby-changes:59938

From: Nobuyoshi <ko1@a...>
Date: Thu, 6 Feb 2020 20:57:43 +0900 (JST)
Subject: [ruby-changes:59938] 32adae431d (master): [ruby/spec] Just test that sleep completes

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

From 32adae431d3f58e4103ca7ea507ee110c18e19c4 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Thu, 6 Feb 2020 15:40:34 +0900
Subject: [ruby/spec] Just test that sleep completes


diff --git a/spec/ruby/core/mutex/sleep_spec.rb b/spec/ruby/core/mutex/sleep_spec.rb
index 6638f5a..9832e31 100644
--- a/spec/ruby/core/mutex/sleep_spec.rb
+++ b/spec/ruby/core/mutex/sleep_spec.rb
@@ -97,7 +97,7 @@ describe "Mutex#sleep" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/mutex/sleep_spec.rb#L97
     m.lock
     times.each do |time|
       # just testing that sleep completes
-      m.sleep(time).should_not == nil
+      -> {m.sleep(time)}.should_not raise_error
     end
   end
 end
-- 
cgit v0.10.2


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

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