Sha256: 5703f52d243728fdb50b2e2c28981d1294d598b2ea0132321920215eea08913e
Contents?: true
Size: 574 Bytes
Versions: 10
Compression:
Stored size: 574 Bytes
Contents
require 'spec_helper' require 'ronin/extensions/file' describe File do subject { File } it "should provide File.escape_path" do subject.should respond_to(:escape_path) end describe "escape_path" do it "should remove null-bytes" do File.escape_path("hello\0world\0").should == "helloworld" end it "should escape home-dir expansions" do File.escape_path("hello/~world").should == "hello/\\~world" end it "should remove '.' and '..' directories" do File.escape_path("hello/./../world").should == "world" end end end
Version data entries
10 entries across 10 versions & 1 rubygems