Commit 8c020fec authored by Boris Bügling's avatar Boris Bügling

Fix rubocop findings

parent 2d8f912c
......@@ -256,26 +256,26 @@ module Pod
@file = Pathname('/yolo.m')
@file.stubs(:realpath).returns(@file)
@libThing = Pathname('/libThing.a')
@libThing.stubs(:realpath).returns(@libThing)
@lib_thing = Pathname('/libThing.a')
@lib_thing.stubs(:realpath).returns(@lib_thing)
end
it 'detects transitive static dependencies which are linked directly to the user target' do
Sandbox::FileAccessor.any_instance.stubs(:vendored_libraries).returns([@libThing])
Sandbox::FileAccessor.any_instance.stubs(:vendored_libraries).returns([@lib_thing])
@installer = Installer.new(config.sandbox, @podfile, @lockfile)
should.raise(Informative) { @installer.install! }.message.should.match /transitive.*libThing/
end
it 'allows transitive static dependencies which contain other source code' do
Sandbox::FileAccessor.any_instance.stubs(:source_files).returns([@file])
Sandbox::FileAccessor.any_instance.stubs(:vendored_libraries).returns([@libThing])
Sandbox::FileAccessor.any_instance.stubs(:vendored_libraries).returns([@lib_thing])
@installer = Installer.new(config.sandbox, @podfile, @lockfile)
should.not.raise(Informative) { @installer.install! }
end
it 'allows transitive static dependencies when both dependencies are linked against the user target' do
PodTarget.any_instance.stubs(:should_build? => false)
Sandbox::FileAccessor.any_instance.stubs(:vendored_libraries).returns([@libThing])
Sandbox::FileAccessor.any_instance.stubs(:vendored_libraries).returns([@lib_thing])
@installer = Installer.new(config.sandbox, @podfile, @lockfile)
should.not.raise(Informative) { @installer.install! }
end
......
......@@ -228,7 +228,7 @@ module Pod
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('') }
File.open(file, 'w') { |f| f.write('') }
sym_file = Pathname.new(Dir.tmpdir) + 'symlinked_file.m'
FileUtils.rm_f(sym_file)
File.symlink(file, sym_file)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment