spec/synx/project_spec.rb in synx-0.0.4 vs spec/synx/project_spec.rb in synx-0.0.5
- old
+ new
@@ -28,20 +28,10 @@
end
end
describe Synx::Project do
- DUMMY_SYNX_PATH = File.join(File.dirname(__FILE__), '..', 'dummy')
- DUMMY_SYNX_TEST_PATH = File.join(File.dirname(__FILE__), '..', 'test_dummy')
- DUMMY_SYNX_TEST_PROJECT_PATH = File.join(DUMMY_SYNX_TEST_PATH, 'dummy.xcodeproj')
-
- before(:all) do
- 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)
- end
-
describe "#sync" do
def verify_group_structure(group, expected_structure)
expected_structure.each do |object_name, object_children|
failure_message = "expected group `#{group.basename}` to have child `#{object_name}`"
@@ -161,9 +151,17 @@
it "should be fine if the groups all exist" do
group_exclusions = %W(/dummy /dummy/GroupThatDoubleReferencesFile /dummy/SuchGroup/VeryChildGroup)
DUMMY_SYNX_TEST_PROJECT.group_exclusions = group_exclusions
expect(DUMMY_SYNX_TEST_PROJECT.group_exclusions).to eq(group_exclusions)
+ end
+
+ it "should be forgiving about missing '/' at beginning of group paths" do
+ group_exclusions = %W(dummy dummy/GroupThatDoubleReferencesFile dummy/SuchGroup/VeryChildGroup)
+ DUMMY_SYNX_TEST_PROJECT.group_exclusions = group_exclusions
+
+ expected = %W(/dummy /dummy/GroupThatDoubleReferencesFile /dummy/SuchGroup/VeryChildGroup)
+ expect(DUMMY_SYNX_TEST_PROJECT.group_exclusions).to eq(expected)
end
end
describe "#root_pathname" do
\ No newline at end of file