Skip to content

Commit

Permalink
Added spec for realpath functionality.
Browse files Browse the repository at this point in the history
  • Loading branch information
neonichu committed Nov 15, 2015
1 parent 8ee86aa commit 2d8f912
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions spec/unit/project_spec.rb
Expand Up @@ -224,6 +224,18 @@ def settings_for_root_configs(key)
@project.add_file_reference('relative/path/to/file.m', @group)
end.message.should.match /Paths must be absolute/
end

it 'uses realpath for resolving symlinks' do
file = Pathname.new(Dir.tmpdir) + 'file.m'
FileUtils.rm_f(file)
File.open(file, 'w') { |file| file.write('') }
sym_file = Pathname.new(Dir.tmpdir) + 'symlinked_file.m'
FileUtils.rm_f(sym_file)
File.symlink(file, sym_file)

ref = @project.add_file_reference(sym_file, @group)
ref.hierarchy_path.should == '/Pods/BananaLib/file.m'
end
end

#----------------------------------------#
Expand Down

0 comments on commit 2d8f912

Please sign in to comment.