diff --git a/core/dir/exist_spec.rb b/core/dir/exist_spec.rb index 43987b0f32..9023de533f 100644 --- a/core/dir/exist_spec.rb +++ b/core/dir/exist_spec.rb @@ -13,3 +13,11 @@ it_behaves_like :dir_exist, :exist? end + +ruby_version_is "3.2" do + describe "Dir.exists?" do + it "has been removed" do + Dir.should_not.respond_to?(:exists?) + end + end +end diff --git a/core/file/exist_spec.rb b/core/file/exist_spec.rb index ddb5febcba..2633376880 100644 --- a/core/file/exist_spec.rb +++ b/core/file/exist_spec.rb @@ -4,3 +4,11 @@ describe "File.exist?" do it_behaves_like :file_exist, :exist?, File end + +ruby_version_is "3.2" do + describe "File.exists?" do + it "has been removed" do + File.should_not.respond_to?(:exists?) + end + end +end diff --git a/shared/file/exist.rb b/shared/file/exist.rb index 3bd97711b4..67424146c5 100644 --- a/shared/file/exist.rb +++ b/shared/file/exist.rb @@ -4,11 +4,6 @@ @object.send(@method, 'a_fake_file').should == false end - it "returns true if the file exist using the alias exists?" do - @object.send(@method, __FILE__).should == true - @object.send(@method, 'a_fake_file').should == false - end - it "raises an ArgumentError if not passed one argument" do -> { @object.send(@method) }.should raise_error(ArgumentError) -> { @object.send(@method, __FILE__, __FILE__) }.should raise_error(ArgumentError)