Update swift message

parent 8278abe0
......@@ -143,8 +143,11 @@ module Pod
'`--private` to ignore them if linting the specification for a private pod'
end
if dot_swift_version.nil?
reasons.to_sentence + ".\n[!] If you are trying to validate a Swift 3.0 Pod, " \
'you need to have a `.swift-version` file. e.g `echo "3.0" > .swift-version`'
reasons.to_sentence + ".\n[!] The validator for Swift projects uses " \
'Swift 2.3 by default, if you are using a different version of ' \
'swift you can use a `.swift-version` file to set the version for ' \
"your Pod. For example to use Swift 3.0, run: \n" \
' `echo "3.0" > .swift-version`'
else
reasons.to_sentence
end
......
......@@ -817,12 +817,14 @@ module Pod
validator = test_swiftpod
validator.stubs(:validated?).returns(false)
result = Validator::Result.new(:error, 'attribute', 'message')
result = Validator::Result.new(:error, 'attribute', 'message')
validator.stubs(:results).returns([result])
validator.failure_reason.should == "1 error.\n[!] If you are trying" \
' to validate a Swift 3.0 Pod, you need to have a `.swift-version` ' \
'file. e.g `echo "3.0" > .swift-version`'
validator.failure_reason.should == "1 error.\n[!] The validator for " \
'Swift projects uses Swift 2.3 by default, if you are using a ' \
'different version of swift you can use a `.swift-version` file ' \
'to set the version for your Pod. For example to use Swift 3.0, ' \
"run: \n `echo \"3.0\" > .swift-version`"
end
describe '#swift_version' do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment