Sha256: fd11ebecb816e8402b8a3e30b1d007e9d273126c92554c7e61a5d8a26f62cc14

Contents?: true

Size: 810 Bytes

Versions: 4

Compression:

Stored size: 810 Bytes

Contents

require 'spec_helper'
require 'key_master'
require 'tmpdir'

describe CocoaPodsKeys::KeyMaster do
  # Previous tests operated under assumption that
  # empty keychains were OK. See for more info:
  # github.com/orta/cocoapods-keys/pull/68

  private

  def validate_syntax(keymaster)
    # write out the interface and the implementation to temp files
    Dir.mktmpdir do |dir|
      # create the header file
      h_file = File.join(dir, "#{keymaster.name}.h")
      IO.write(h_file, keymaster.interface)
      # create the implementation file
      m_file = File.join(dir, "#{keymaster.name}.m")
      IO.write(m_file, keymaster.implementation)
      # attempt to validate syntax with clang
      Dir.chdir(dir)
      system(`xcrun --sdk macosx --find clang`.strip, '-fsyntax-only', m_file)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
cocoapods-keys-1.4.0 spec/key_master_spec.rb
cocoapods-keys-1.3.2 spec/key_master_spec.rb
cocoapods-keys-1.3.1 spec/key_master_spec.rb
cocoapods-keys-1.3.0 spec/key_master_spec.rb