spec/synx/project_spec.rb in synx-0.0.61 vs spec/synx/project_spec.rb in synx-0.1.0
- old
+ new
@@ -30,14 +30,16 @@
describe Synx::Project do
describe "#sync" do
def verify_group_structure(group, expected_structure)
- expected_structure.each do |object_name, object_children|
+ expected_structure.each_with_index do |(object_name, object_children), index|
failure_message = "expected group `#{group.basename}` to have child `#{object_name}`"
- object = group.children.detect { |child| child.basename == object_name }
+ object = group.children[index]
+ expect(object.basename).to eq(object_name)
expect(group).to_not be_nil, failure_message
+ next if ["Products", "Frameworks"].include?(object.display_name)
if object.instance_of?(Xcodeproj::Project::Object::PBXGroup)
object_children ||= {}
found_children = object.children.map(&:basename)
missing_children_in_group = object_children.keys - found_children
@@ -233,6 +235,6 @@
expected = DUMMY_SYNX_TEST_PROJECT.send(:work_root_pathname) + "some" + "path" + "to" + "thing"
expect(value).to eq(expected)
end
end
-end
\ No newline at end of file
+end