[Validator] Add writer to swift_version

parent 7eb9ef04
......@@ -251,6 +251,10 @@ module Pod
@swift_version ||= dot_swift_version || '2.3'
end
# Set the SWIFT_VERSION that should be used to validate the pod.
#
attr_writer :swift_version
# @return [String] the SWIFT_VERSION in the .swift-version file or nil.
#
def dot_swift_version
......
......@@ -834,6 +834,13 @@ module Pod
validator.swift_version.should == '2.3'
end
it 'allows the user to set the version' do
validator = test_swiftpod
validator.stubs(:dot_swift_version).returns('3.0')
validator.swift_version = '4.0'
validator.swift_version.should == '4.0'
end
it 'checks for dot_swift_version' do
validator = test_swiftpod
validator.expects(:dot_swift_version)
......
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