Sha256: 6305d9d991892fd7f583d61040d6b242a633aa3d0a28f42abc057b0a28b68b2e

Contents?: true

Size: 850 Bytes

Versions: 12

Compression:

Stored size: 850 Bytes

Contents

require "spec_helper"

describe XcodeProject::PBXProject do
	before(:each) { @data = prepare_example_project.read }
	let(:obj)     { @data.project }

	describe "#targets" do
		it "returns the array of target objects" do
			targets = obj.targets
			targets.should be_an_instance_of(Array)
			targets.each {|obj| obj.should be_an_instance_of(XcodeProject::PBXNativeTarget) }
		end
	end
	
	describe "#target" do
		context "if the target exists" do
			it "returns the object" do
				obj.target('example').should be_an_instance_of(XcodeProject::PBXNativeTarget)
			end
		end
		context "if the target doesn't exist" do
			it "returns nil" do
				obj.target('ghost-target').should be_nil
			end
		end
	end

	describe "#main_group" do
		it "returns the main group object" do
			obj.main_group.should be_an_instance_of(XcodeProject::PBXGroup)
		end
	end
end

Version data entries

12 entries across 12 versions & 1 rubygems

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