mirror of
https://github.com/zhigang1992/synx.git
synced 2026-01-12 22:52:53 +08:00
In many cases it's safe to assume the load path will be setup correctly at runtime, eliminating the need for absolute paths. For instance, in your bin/synx executable, RubyGems sets the load path such that you can just `require "synx"`. When you use RSpec, it also sets the load path to allow you to use `require "spec_helper"`. I also cleaned up the `File.join(File.dirname(__FILE__)...` stuff to use the more idiomatic `File.expand_path`.
14 lines
460 B
Ruby
14 lines
460 B
Ruby
require 'bundler/setup'
|
|
require 'synx'
|
|
require 'pry'
|
|
|
|
DUMMY_SYNX_PATH = File.expand_path('../dummy', __FILE__)
|
|
DUMMY_SYNX_TEST_PATH = File.expand_path('../test_dummy', __FILE__)
|
|
DUMMY_SYNX_TEST_PROJECT_PATH = File.join(DUMMY_SYNX_TEST_PATH, 'dummy.xcodeproj')
|
|
FileUtils.rm_rf(DUMMY_SYNX_TEST_PATH)
|
|
FileUtils.cp_r(DUMMY_SYNX_PATH, DUMMY_SYNX_TEST_PATH)
|
|
DUMMY_SYNX_TEST_PROJECT = Synx::Project.open(DUMMY_SYNX_TEST_PROJECT_PATH)
|
|
|
|
RSpec.configure do |config|
|
|
end
|