diff --git a/lib/slither.rb b/lib/slither.rb index 92aaace..3c11e0f 100644 --- a/lib/slither.rb +++ b/lib/slither.rb @@ -48,7 +48,7 @@ def self.write(filename, definition_name, data) end def self.parse(filename, definition_name) - raise ArgumentError, "File #{filename} does not exist." unless File.exists?(filename) + raise ArgumentError, "File #{filename} does not exist." unless File.exist?(filename) file_io = File.open(filename, 'r') parseIo(file_io, definition_name) diff --git a/spec/slither_spec.rb b/spec/slither_spec.rb index b50850f..83923a0 100644 --- a/spec/slither_spec.rb +++ b/spec/slither_spec.rb @@ -70,10 +70,6 @@ end context "when the file is found" do - before do - allow(File).to receive(:exists?).and_return(true) - end - context "and the definition is not found" do it "raises an error due to the definition name not being found" do expect do