File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed
Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change 3030 @tempfile . gets . should == "Test!\n "
3131 end
3232
33- it "returns a private file" do
34- @tempfile = Tempfile . create
35- @tempfile . stat . mode . to_s ( 8 ) . should . end_with? ( "600" )
33+ platform_is_not :windows do
34+ it "returns a private file" do
35+ @tempfile = Tempfile . create
36+ @tempfile . stat . mode . to_s ( 8 ) . should . end_with? ( "600" )
37+ end
38+ end
39+
40+ platform_is :windows do
41+ it "returns a public file" do
42+ @tempfile = Tempfile . create
43+ @tempfile . stat . mode . to_s ( 8 ) . should . end_with? ( "666" )
44+ end
3645 end
3746
3847 context "when called with a block" do
99108 File . writable? ( @tempfile . path ) . should be_true
100109 end
101110
102- it "raises NoMethodError if passed something else than an Integer " do
103- -> { Tempfile . create ( mode : "wb" ) } . should raise_error ( NoMethodError , " undefined method ' |' for an instance of String" )
111+ it "raises NoMethodError if passed a String mode " do
112+ -> { Tempfile . create ( mode : "wb" ) } . should raise_error ( NoMethodError , / undefined method ['`] |' for .+ String/ )
104113 end
105114 end
106115
You can’t perform that action at this time.
0 commit comments