Sha256: 26597fdd49f71c062e7a839c45572cd5f257e99c8211d0d24d56d1bf61131edb
Contents?: true
Size: 905 Bytes
Versions: 52
Compression:
Stored size: 905 Bytes
Contents
require File.dirname(File.join(__rhoGetCurrentDir(), __FILE__)) + '/../../spec_helper' require File.dirname(File.join(__rhoGetCurrentDir(), __FILE__)) + '/../../shared/file/setgid' describe "File.setgid?" do it_behaves_like :file_setgid, :setgid?, File end describe "File.setgid?" 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.setgid?(@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.setgid?(@name).should == false end platform_is_not :windows do it "should return true when the gid bit is set" do system "chmod g+s #{@name}" File.setgid?(@name).should == true end end end
Version data entries
52 entries across 52 versions & 1 rubygems