Commit 7b400efb authored by Marius Rackwitz's avatar Marius Rackwitz

[Spec] Add test for Validator#_validate_license

parent 45b51e00
...@@ -435,6 +435,16 @@ module Pod ...@@ -435,6 +435,16 @@ module Pod
validator.results.map(&:to_s).first.should.match /matches non-header files \(JSONKit\.m\)/ validator.results.map(&:to_s).first.should.match /matches non-header files \(JSONKit\.m\)/
validator.result_type.should == :error validator.result_type.should == :error
end end
it 'checks presence of license file' do
file = write_podspec(stub_podspec(/.*license.*$/, '"license": "MIT",'))
validator = Validator.new(file, SourcesManager.master.map(&:url))
validator.stubs(:build_pod)
validator.stubs(:validate_url)
validator.validate
validator.results.map(&:to_s).first.should.match /Unable to find a license file/
validator.result_type.should == :warning
end
end end
it 'validates a podspec with dependencies' do it 'validates a podspec with dependencies' 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