Commit ea67c41e authored by Samuel Giddins's avatar Samuel Giddins

Merge pull request #5223 from CocoaPods/mr-spec-cleanup

[Spec] Spring-cleaning of the test harness
parents c46f5349 159d39fe
# Don't let testing shortcuts get into master by accident
(modified_files + added_files - %w(Dangerfile)).each do |file|
next unless File.file?(file)
contents = File.read(file)
if file.start_with?('spec')
fail("`fit` left in tests (#{file})") if contents =~ /fit/
fail("`fdescribe` left in tests (#{file})") if contents =~ /fdescribe/
fail("`xit` or `fit` left in tests (#{file})") if contents =~ /^\w*[xf]it/
fail("`fdescribe` left in tests (#{file})") if contents =~ /^\w*fdescribe/
end
end
Subproject commit 8d4899ef3b44bd476cd887a2d984b36bcf30529d
Subproject commit 07d160f7734a019b1b93d3a2eed2d8b26d6baf5b
......@@ -214,15 +214,6 @@ module Pod
end
end
# @todo VCR is required in CocoaPods only for this test.
xit 'lints a remote podspec' do
Dir.chdir(fixture('spec-repos') + 'master/Specs/JSONKit/1.4/') do
cmd = command('spec', 'lint', '--quick', '--allow-warnings', '--silent', 'https://github.com/CocoaPods/Specs/raw/master/A2DynamicDelegate/2.0.1/A2DynamicDelegate.podspec')
# VCR.use_cassette('linter', :record => :new_episodes) { }
lambda { cmd.run }.should.not.raise
end
end
before do
text = (fixture('spec-repos') + 'master/Specs/JSONKit/1.4/JSONKit.podspec.json').read
text.gsub!(/.*license.*/, '"license": { "file": "LICENSE" },')
......
......@@ -317,6 +317,12 @@ describe_cli 'pod' do
behaves_like cli_spec 'spec_lint',
'spec lint --quick'
end
describe 'Lints a remote Pod' do
spec_url = 'https://github.com/CocoaPods/Specs/raw/master/Specs/A2DynamicDelegate/2.0.2/A2DynamicDelegate.podspec.json'
behaves_like cli_spec 'spec_lint_remote',
"spec lint --quick --allow-warnings --silent #{spec_url}"
end
end
#--------------------------------------#
......
......@@ -564,15 +564,6 @@ module Pod
]
end
xit 'removes the specifications of the changed pods to prevent confusion in the resolution process' do
@analyzer.allow_pre_downloads = true
podspec = @analyzer.sandbox.root + 'Local Podspecs/JSONKit.podspec'
podspec.dirname.mkpath
File.open(podspec, 'w') { |f| f.puts('test') }
@analyzer.analyze
podspec.should.not.exist?
end
it 'adds the specifications to the correspondent libraries' do
@analyzer.analyze.targets[0].pod_targets.map(&:specs).flatten.map(&:to_s).should == [
'AFNetworking (1.0.1)',
......
......@@ -633,10 +633,10 @@ module Pod
@installer.send(:install_libraries)
end
xit 'adds the frameworks required by to the pod to the project for informative purposes' do
it 'adds the frameworks required by to the pod to the project for informative purposes' do
Specification::Consumer.any_instance.stubs(:frameworks).returns(['QuartzCore'])
@installer.install!
names = @installer.sandbox.project['Frameworks'].children.map(&:name)
names = @installer.sandbox.project['Frameworks']['iOS'].children.map(&:name)
names.sort.should == ['Foundation.framework', 'QuartzCore.framework']
end
end
......@@ -723,15 +723,6 @@ module Pod
@installer.send(:set_target_dependencies)
end.should.not.raise NoMethodError
end
xit 'sets the pod targets as dependencies of the aggregate target' do
end
xit 'sets the dependecies of the pod targets' do
end
xit 'is robusts against subspecs' do
end
end
#--------------------------------------#
......
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