Sha256: 6204db34d0f858524b362d5731fdb9a0588160f5bd7dcd02e47f0c195d7ec2c6
Contents?: true
Size: 573 Bytes
Versions: 3
Compression:
Stored size: 573 Bytes
Contents
require File.expand_path('../fixtures/common', __FILE__) require 'tempfile' describe "Tempfile#path" do before :each do @tempfile = Tempfile.new("specs", tmp("")) end after :each do TempfileSpecs.cleanup @tempfile end it "returns the path to the tempfile" do tmpdir = tmp("") path = @tempfile.path platform_is :windows do # on Windows, both types of slashes are OK, # but the tmp helper always uses '/' path.gsub!('\\', '/') end path[0, tmpdir.length].should == tmpdir path.should include("specs") end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rubysl-tempfile-2.0.1 | spec/path_spec.rb |
rubysl-tempfile-1.0.0 | spec/path_spec.rb |
rubysl-tempfile-2.0.0 | spec/path_spec.rb |