Commit 8323920b authored by Kyle Fuller's avatar Kyle Fuller

[linter] Exclude screenshot validation from other tests

parent e7de2605
......@@ -75,6 +75,7 @@ module Pod
validator = Validator.new(file)
validator.quick = true
validator.stubs(:validate_homepage)
validator.stubs(:validate_screenshots)
validator.validate
validator.validation_dir.should.be == Pathname.new("/private/tmp/CocoaPods/Lint")
end
......@@ -141,6 +142,7 @@ module Pod
file = write_podspec(stub_podspec)
sut = Validator.new(file)
sut.stubs(:validate_homepage)
sut.stubs(:validate_screenshots)
sut.no_clean = true
sut.validate
sut.validation_dir.should.exist
......@@ -150,6 +152,7 @@ module Pod
file = write_podspec(stub_podspec)
sut = Validator.new(file)
sut.stubs(:validate_homepage)
sut.stubs(:validate_screenshots)
sut.expects(:install_pod).twice
sut.expects(:build_pod).twice
sut.expects(:check_file_patterns).twice
......@@ -159,6 +162,7 @@ module Pod
it "uses the deployment target of the specification" do
sut = Validator.new(podspec_path)
sut.stubs(:validate_homepage)
sut.stubs(:validate_screenshots)
podfile = sut.send(:podfile_from_spec, :ios, '5.0')
dependency = podfile.target_definitions['Pods'].dependencies.first
dependency.external_source.has_key?(:podspec).should.be.true
......@@ -167,6 +171,7 @@ module Pod
it "respects the local option" do
sut = Validator.new(podspec_path)
sut.stubs(:validate_homepage)
sut.stubs(:validate_screenshots)
podfile = sut.send(:podfile_from_spec, :ios, '5.0')
deployment_target = podfile.target_definitions['Pods'].platform.deployment_target
deployment_target.to_s.should == "5.0"
......@@ -177,6 +182,7 @@ module Pod
sut.stubs(:check_file_patterns)
sut.stubs(:xcodebuild).returns("file.m:1:1: warning: direct access to objective-c's isa is deprecated")
sut.stubs(:validate_homepage)
sut.stubs(:validate_screenshots)
sut.validate
first = sut.results.map(&:to_s).first
first.should.include "[xcodebuild]"
......@@ -188,6 +194,7 @@ module Pod
sut = Validator.new(file)
sut.stubs(:build_pod)
sut.stubs(:validate_homepage)
sut.stubs(:validate_screenshots)
sut.validate
sut.results.map(&:to_s).first.should.match /source_files.*did not match/
sut.result_type.should == :error
......@@ -202,6 +209,7 @@ module Pod
spec = Specification.from_file(file)
sut = Validator.new(spec)
sut.stubs(:validate_homepage)
sut.stubs(:validate_screenshots)
sut.stubs(:build_pod)
sut.validate
sut.validated?.should.be.true
......
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