Skip to content

Commit

Permalink
Correct some File.expand_path specs on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
luislavena committed Sep 10, 2011
1 parent bdd436a commit 4eb8242
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions core/file/expand_path_spec.rb
Expand Up @@ -25,14 +25,19 @@
not_compliant_on :ironruby do
it "converts a pathname to an absolute pathname, Ruby-Talk:18512 " do
# Because of Ruby-Talk:18512
File.expand_path('a.').should == File.join(@base, 'a.')
File.expand_path('.a').should == File.join(@base, '.a')
File.expand_path('a..').should == File.join(@base, 'a..')
File.expand_path('..a').should == File.join(@base, '..a')
File.expand_path('a../b').should == File.join(@base, 'a../b')
end
end

platform_is_not :windows do
it "keeps trailing dots on absolute pathname, Ruby-Talk:18512" do
File.expand_path('a.').should == File.join(@base, 'a.')
File.expand_path('a..').should == File.join(@base, 'a..')
end
end

it "converts a pathname to an absolute pathname, using a complete path" do
File.expand_path("", "#{@tmpdir}").should == "#{@tmpdir}"
File.expand_path("a", "#{@tmpdir}").should =="#{@tmpdir}/a"
Expand Down

0 comments on commit 4eb8242

Please sign in to comment.