diff --git a/tests/SketchUp Ruby API/TC_Sketchup_ComponentDefinition.rb b/tests/SketchUp Ruby API/TC_Sketchup_ComponentDefinition.rb index b0f9871..06c6db9 100644 --- a/tests/SketchUp Ruby API/TC_Sketchup_ComponentDefinition.rb +++ b/tests/SketchUp Ruby API/TC_Sketchup_ComponentDefinition.rb @@ -232,7 +232,7 @@ def test_save_as path = "#{temp_dir}/my component.skp" assert(definition.save_as(path)) - assert(File.exists?(path)) + assert(File.exist?(path)) assert_equal(definition.path, path) ensure File.delete(path) @@ -254,7 +254,7 @@ def test_save_as_custom_version path = "#{temp_dir}/my component.skp" assert(definition.save_as(path, Sketchup::Model::VERSION_2017)) - assert(File.exists?(path)) + assert(File.exist?(path)) assert_equal(definition.path, path) ensure File.delete(path) @@ -299,7 +299,7 @@ def test_save_copy path = "#{temp_dir}/my component.skp" assert(definition.save_copy(path)) - assert(File.exists?(path)) + assert(File.exist?(path)) assert(definition.path != path) ensure File.delete(path) @@ -321,7 +321,7 @@ def test_save_copy_custom_version path = "#{temp_dir}/my component.skp" assert(definition.save_copy(path, Sketchup::Model::VERSION_2017)) - assert(File.exists?(path)) + assert(File.exist?(path)) assert(definition.path != path) ensure File.delete(path) diff --git a/tests/SketchUp Ruby API/utils/image_helper.rb b/tests/SketchUp Ruby API/utils/image_helper.rb index dd3cae3..957155c 100644 --- a/tests/SketchUp Ruby API/utils/image_helper.rb +++ b/tests/SketchUp Ruby API/utils/image_helper.rb @@ -5,7 +5,7 @@ module ImageHelper def create_test_image entities = Sketchup.active_model.entities filename = File.join(__dir__, "../shared/99bugs.jpg") - assert(File.exists?(filename), "File missing: #{filename}") + assert(File.exist?(filename), "File missing: #{filename}") image = Sketchup.active_model.entities.add_image(filename, ORIGIN, 1.m) image end