Sha256: 921c2375e08ff103a5b1e22b11479e4a6af60f77f80f7e48cf7ae501f2a896b6
Contents?: true
Size: 915 Bytes
Versions: 31
Compression:
Stored size: 915 Bytes
Contents
require File.dirname(File.join(__rhoGetCurrentDir(), __FILE__)) + '/../../spec_helper' require File.dirname(File.join(__rhoGetCurrentDir(), __FILE__)) + '/../../shared/file/setuid' describe "File.setuid?" do it_behaves_like :file_setuid, :setuid?, File end describe "File.setuid?" do before(:each) do @name = 'test.txt' @file = File.new(@name, "w") end after(:each) do File.delete(@name) if File.exists?(@name) end it "should return false if the file was just made" do File.setuid?(@name).should == false end it "should be false if the file doesn't exist" do File.delete(@name) # delete it prematurely, just for this part File.setuid?(@name).should == false end platform_is_not :windows, :android do it "should return true when the gid bit is set" do system "chmod u+s #{@name}" File.setuid?(@name).should == true end end end
Version data entries
31 entries across 31 versions & 1 rubygems