From 21f4795e80c244f0931dc0509b3bf6b3d650e7bd Mon Sep 17 00:00:00 2001 From: eregon Date: Sat, 29 Dec 2018 10:54:22 +0000 Subject: Refactor Process.clock_gettime spec to give more information when it fails git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- spec/ruby/core/process/clock_gettime_spec.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'spec/ruby/core') diff --git a/spec/ruby/core/process/clock_gettime_spec.rb b/spec/ruby/core/process/clock_gettime_spec.rb index a81919ddfe..3523338c3f 100644 --- a/spec/ruby/core/process/clock_gettime_spec.rb +++ b/spec/ruby/core/process/clock_gettime_spec.rb @@ -5,9 +5,10 @@ describe "Process.clock_gettime" do # RHEL: https://rubyci.org/logs/rubyci.s3.amazonaws.com/rhel_zlinux/ruby-trunk/log/20181229T063303Z.fail.html.gz # Solaris: https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11x/ruby-trunk/log/20181229T002409Z.fail.html.gz platform_is_not :windows, :linux, :solaris do - it 'can be called with all declared clocks' do - Process.constants.select { |c| c.to_s.start_with?('CLOCK_') }.each do |c| - Process.clock_gettime(Process.const_get(c)).should be_an_instance_of(Float) + Process.constants.select { |c| c.to_s.start_with?('CLOCK_') }.each do |c| + it "can be called with Process::#{c}" do + value = Process.const_get(c) + Process.clock_gettime(value).should be_an_instance_of(Float) end end end -- cgit v1.2.3