Sha256: 3f059496a5a97ade3f23c62e9e8ad9091e87c9663e6929ebd2af8d370032271d

Contents?: true

Size: 1.17 KB

Versions: 1

Compression:

Stored size: 1.17 KB

Contents

#
#	Example proj file hierarhy
#
# main
# \--group1a
#    |--group2a
#    |--dir2c
#    |   \--dir3a
#    |      \--dir4a
#    |         |--file5a-a.m
#    |         |--file5a-a.h
#    |         |--file5a-r.m
#    |         \--file5a-r.h
#    |
#    |--file2c.m
#    \--file2c.h

require 'xcodeproject/project'
require 'xcodeproject/exceptions'
require 'rr' 

RSpec.configure do |config|
  config.mock_with :rr
end 

def prepare_sandbox
	%x{ mkdir -p #{example_sandbox_path} } unless File.exist?(example_sandbox_path)
end

def prepare_example_project
	prepare_sandbox

	proj_source_dir = "#{File.dirname(__FILE__)}/../resources/example"
	%x{ rm -vr #{example_project_dir} }
	%x{ cp -vr #{proj_source_dir} #{example_sandbox_path} }

	XcodeProject::Project.new(example_project_bundle_path)
end

def example_sandbox_path;        Pathname.new('/tmp/example_sandbox') end
def example_empty_sandbox_path;  Pathname.new('/tmp/example_sandbox_empty') end
def example_project_dir;         example_sandbox_path.join('example') end
def example_project_bundle_path; example_project_dir.join('example.xcodeproj') end
def example_project_file_path;   example_project_bundle_path.join('project.pbxproj') end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
xcodeproject-0.2.3 lib/xcodeproject/spec/spec_helper.rb