mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Drop support for ruby 2.4 from ruby/spec
This commit is contained in:
parent
3a2073e61b
commit
826f44834f
Notes:
git
2020-04-01 15:36:48 +09:00
145 changed files with 2343 additions and 3347 deletions
|
|
@ -50,26 +50,24 @@ describe :file_path, shared: true do
|
|||
@file.send(@method).encoding.should == Encoding.find("euc-jp")
|
||||
end
|
||||
|
||||
ruby_version_is "2.5" do
|
||||
platform_is :linux do
|
||||
guard -> { defined?(File::TMPFILE) } do
|
||||
before :each do
|
||||
@dir = tmp("tmpfilespec")
|
||||
mkdir_p @dir
|
||||
end
|
||||
platform_is :linux do
|
||||
guard -> { defined?(File::TMPFILE) } do
|
||||
before :each do
|
||||
@dir = tmp("tmpfilespec")
|
||||
mkdir_p @dir
|
||||
end
|
||||
|
||||
after :each do
|
||||
rm_r @dir
|
||||
end
|
||||
after :each do
|
||||
rm_r @dir
|
||||
end
|
||||
|
||||
it "raises IOError if file was opened with File::TMPFILE" do
|
||||
begin
|
||||
File.open(@dir, File::RDWR | File::TMPFILE) do |f|
|
||||
-> { f.send(@method) }.should raise_error(IOError)
|
||||
end
|
||||
rescue Errno::EOPNOTSUPP, Errno::EINVAL, Errno::EISDIR
|
||||
skip "no support from the filesystem"
|
||||
it "raises IOError if file was opened with File::TMPFILE" do
|
||||
begin
|
||||
File.open(@dir, File::RDWR | File::TMPFILE) do |f|
|
||||
-> { f.send(@method) }.should raise_error(IOError)
|
||||
end
|
||||
rescue Errno::EOPNOTSUPP, Errno::EINVAL, Errno::EISDIR
|
||||
skip "no support from the filesystem"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue