Skip to content

Commit

Permalink
Add failing test for issue CocoaPods#69.
Browse files Browse the repository at this point in the history
  • Loading branch information
luisdelarosa committed Apr 5, 2014
1 parent 1e3a805 commit 814fa26
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions spec/yaml_converter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,33 @@ def sample_yaml
LOCKFILE
end

def yaml_with_merge_conflict
text = <<-LOCKFILE.strip_heredoc
PODS:
- Kiwi (2.2)
- ObjectiveSugar (1.1.1)
DEPENDENCIES:
- Kiwi
- ObjectiveSugar (from `../`)
EXTERNAL SOURCES:
ObjectiveSugar:
:path: ../
SPEC CHECKSUMS:
<<<<<<< HEAD
Kiwi: 05f988748c5136c6daed8dab3563eca929399a72
ObjectiveSugar: 7377622e35ec89ce893b05dd0af4bede211b01a4
=======
Kiwi: db174bba4ee8068b15d7122f1b22fb64b7c1d378
ObjectiveSugar: 27c680bb74f0b0415e9e743d5d61d77bc3292d3f
>>>>>>> b65623cbf5e105acbc3e2dec48f8024fa82003ce
COCOAPODS: 0.29.0
LOCKFILE
end

#-----------------------------------------------------------------------------#

module Pod
Expand Down Expand Up @@ -92,6 +119,12 @@ module Pod
YAMLConverter.convert(value)
end.message.should.match /Unsupported class/
end

it "raises an more reasonable error when it encounters a merge conflict" do
should.raise Informative do
value = YAML.load(yaml_with_merge_conflict)
end
end
end

#-------------------------------------------------------------------------#
Expand Down

0 comments on commit 814fa26

Please sign in to comment.