Sha256: e9a56865467b3e7e4806de6b95bb7a2ccb3bef9bb937b41605b1d8f3db821b4f

Contents?: true

Size: 838 Bytes

Versions: 12

Compression:

Stored size: 838 Bytes

Contents

require "spec_helper"

describe XcodeProject::PBXBuildFile do
	let(:root)         { prepare_example_project.read.send(:root) }
	let(:obj_file_ref) { root.project.main_group.file_ref("group1a/file2c.m") }
	let(:obj)          { root.project.target('example').sources_build_phase.send(:build_file, obj_file_ref.uuid) }

	describe "#file_ref" do
		it "returns the object" do
			obj.file_ref.should be_an_instance_of(XcodeProject::PBXFileReference)
		end
	end

	describe "#remove!" do
		it "removes the current build file" do
			obj.remove!
			root.project.target('example').sources_build_phase.send(:build_file, obj_file_ref.uuid).should be_nil
		end
		it "removes the current build file from all targets" do
			root.project.targets.each do |target|
				target.sources.map {|obj| obj.uuid }.should_not include(obj.uuid)
			end
		end
	end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
xcodeproject-0.3.13 spec/pbx_build_file_spec.rb
xcodeproject-0.3.12 spec/pbx_build_file_spec.rb
xcodeproject-0.3.11 spec/pbx_build_file_spec.rb
xcodeproject-0.3.10 spec/pbx_build_file_spec.rb
xcodeproject-0.3.9 spec/pbx_build_file_spec.rb
xcodeproject-0.3.8 spec/pbx_build_file_spec.rb
xcodeproject-0.3.6 spec/pbx_build_file_spec.rb
xcodeproject-0.3.5 spec/pbx_build_file_spec.rb
xcodeproject-0.3.1 spec/pbx_build_file_spec.rb
xcodeproject-0.3.0 spec/pbx_build_file_spec.rb
xcodeproject-0.2.4 spec/pbx_build_file_spec.rb
xcodeproject-0.2.3 lib/xcodeproject/spec/pbx_build_file_spec.rb