Skip to content

Commit 814fa26

Browse files
committedApr 5, 2014
Add failing test for issue CocoaPods#69.
1 parent 1e3a805 commit 814fa26

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
 

‎spec/yaml_converter_spec.rb

+33
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,33 @@ def sample_yaml
2424
LOCKFILE
2525
end
2626

27+
def yaml_with_merge_conflict
28+
text = <<-LOCKFILE.strip_heredoc
29+
PODS:
30+
- Kiwi (2.2)
31+
- ObjectiveSugar (1.1.1)
32+
33+
DEPENDENCIES:
34+
- Kiwi
35+
- ObjectiveSugar (from `../`)
36+
37+
EXTERNAL SOURCES:
38+
ObjectiveSugar:
39+
:path: ../
40+
41+
SPEC CHECKSUMS:
42+
<<<<<<< HEAD
43+
Kiwi: 05f988748c5136c6daed8dab3563eca929399a72
44+
ObjectiveSugar: 7377622e35ec89ce893b05dd0af4bede211b01a4
45+
=======
46+
Kiwi: db174bba4ee8068b15d7122f1b22fb64b7c1d378
47+
ObjectiveSugar: 27c680bb74f0b0415e9e743d5d61d77bc3292d3f
48+
>>>>>>> b65623cbf5e105acbc3e2dec48f8024fa82003ce
49+
50+
COCOAPODS: 0.29.0
51+
LOCKFILE
52+
end
53+
2754
#-----------------------------------------------------------------------------#
2855

2956
module Pod
@@ -92,6 +119,12 @@ module Pod
92119
YAMLConverter.convert(value)
93120
end.message.should.match /Unsupported class/
94121
end
122+
123+
it "raises an more reasonable error when it encounters a merge conflict" do
124+
should.raise Informative do
125+
value = YAML.load(yaml_with_merge_conflict)
126+
end
127+
end
95128
end
96129

97130
#-------------------------------------------------------------------------#

0 commit comments

Comments
 (0)
Please sign in to comment.