Skip to content

Commit 2eb0a1a

Browse files
committed
Fix birthtime specs on old Linux
1 parent 1802142 commit 2eb0a1a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

spec/ruby/core/file/birthtime_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@
2121
File.birthtime(@file) # Avoid to failure of mock object with old Kernel and glibc
2222
File.birthtime(mock_to_path(@file))
2323
rescue NotImplementedError => e
24-
skip e.message if e.message.start_with?("birthtime() function")
24+
e.message.should.start_with?("birthtime() function")
2525
end
2626

2727
it "raises an Errno::ENOENT exception if the file is not found" do
2828
-> { File.birthtime('bogus') }.should raise_error(Errno::ENOENT)
2929
rescue NotImplementedError => e
30-
skip e.message if e.message.start_with?("birthtime() function")
30+
e.message.should.start_with?("birthtime() function")
3131
end
3232
end
3333

@@ -45,7 +45,7 @@
4545
@file.birthtime
4646
@file.birthtime.should be_kind_of(Time)
4747
rescue NotImplementedError => e
48-
skip e.message if e.message.start_with?("birthtime() function")
48+
e.message.should.start_with?("birthtime() function")
4949
end
5050
end
5151
end

spec/ruby/core/file/stat/birthtime_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
st.birthtime.should be_kind_of(Time)
1919
st.birthtime.should <= Time.now
2020
rescue NotImplementedError => e
21-
skip e.message if e.message.start_with?("birthtime() function")
21+
e.message.should.start_with?("birthtime() function")
2222
end
2323
end
2424
end

0 commit comments

Comments
 (0)