Method: Pod::Specification::DSL#test_spec

Defined in:
lib/cocoapods-core/specification/dsl.rb

#test_spec(name = 'Tests', &block) ⇒ Object

Represents a test specification for the library. Here you can place all your tests for your podspec along with the test dependencies.


Examples:


Pod::Spec.new do |spec|
  spec.name = 'NSAttributedString+CCLFormat'

  spec.test_spec do |test_spec|
    test_spec.source_files = 'NSAttributedString+CCLFormatTests.m'
    test_spec.dependency 'Expecta'
  end
end


1761
1762
1763
1764
1765
# File 'lib/cocoapods-core/specification/dsl.rb', line 1761

def test_spec(name = 'Tests', &block)
  subspec = Specification.new(self, name, true, &block)
  @subspecs << subspec
  subspec
end