mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Fix birthtime specs on old Linux
This commit is contained in:
parent
180214287e
commit
2eb0a1a749
Notes:
git
2025-06-06 06:43:03 +00:00
2 changed files with 4 additions and 4 deletions
|
@ -21,13 +21,13 @@ platform_is :windows, :darwin, :freebsd, :netbsd, :linux do
|
|||
File.birthtime(@file) # Avoid to failure of mock object with old Kernel and glibc
|
||||
File.birthtime(mock_to_path(@file))
|
||||
rescue NotImplementedError => e
|
||||
skip e.message if e.message.start_with?("birthtime() function")
|
||||
e.message.should.start_with?("birthtime() function")
|
||||
end
|
||||
|
||||
it "raises an Errno::ENOENT exception if the file is not found" do
|
||||
-> { File.birthtime('bogus') }.should raise_error(Errno::ENOENT)
|
||||
rescue NotImplementedError => e
|
||||
skip e.message if e.message.start_with?("birthtime() function")
|
||||
e.message.should.start_with?("birthtime() function")
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -45,7 +45,7 @@ platform_is :windows, :darwin, :freebsd, :netbsd, :linux do
|
|||
@file.birthtime
|
||||
@file.birthtime.should be_kind_of(Time)
|
||||
rescue NotImplementedError => e
|
||||
skip e.message if e.message.start_with?("birthtime() function")
|
||||
e.message.should.start_with?("birthtime() function")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -18,7 +18,7 @@ platform_is(:windows, :darwin, :freebsd, :netbsd,
|
|||
st.birthtime.should be_kind_of(Time)
|
||||
st.birthtime.should <= Time.now
|
||||
rescue NotImplementedError => e
|
||||
skip e.message if e.message.start_with?("birthtime() function")
|
||||
e.message.should.start_with?("birthtime() function")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue