From 32a25294bb9a21a56033e1645ee68b054d1df840 Mon Sep 17 00:00:00 2001 From: Richard Lee Date: Sun, 30 Mar 2014 00:58:13 +0800 Subject: [PATCH] Check requires_arc set explicitly in podspec --- lib/cocoapods-core/specification/linter.rb | 2 +- spec/specification/linter_spec.rb | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/cocoapods-core/specification/linter.rb b/lib/cocoapods-core/specification/linter.rb index b0f448b93..a8b8515cc 100644 --- a/lib/cocoapods-core/specification/linter.rb +++ b/lib/cocoapods-core/specification/linter.rb @@ -386,7 +386,7 @@ def validate_file_patterns # @todo remove in 0.18 and switch the default to true. # def check_tmp_arc_not_nil - if consumer.requires_arc.nil? + if consumer.spec.attributes_hash["requires_arc"].nil? warning "A value for `requires_arc` should be specified until the " \ "migration to a `true` default." end diff --git a/spec/specification/linter_spec.rb b/spec/specification/linter_spec.rb index 876d3db3d..892300c98 100644 --- a/spec/specification/linter_spec.rb +++ b/spec/specification/linter_spec.rb @@ -354,9 +354,7 @@ def message_should_include(*values) message.should.include('spec is empty') end - xit "requires that the require_arc value is specified until the switch to a true default" do - # TODO the default value is invalidating this test - consumer = @spec.consumer(:ios) + it "requires that the requires_arc value is specified explcitly until the switch to a true default" do @spec.requires_arc = nil @linter.lint message = @linter.results.first.message