Sha256: 00a66ac4565b2ee246c52c7c2596bbd219e095786b0f6da0cada1062534317a8

Contents?: true

Size: 776 Bytes

Versions: 7

Compression:

Stored size: 776 Bytes

Contents

require 'cocoapods'
require File.join(File.dirname(__FILE__), '../../lib/cocoapods_plugin')
require File.join(File.dirname(__FILE__), '..', 'spec_helper')

describe Slather do
  describe 'CocoaPods Plugin' do
    it 'should setup slather for coverage in the Pods project' do
      mock_project = double(Xcodeproj::Project)
      allow(Xcodeproj::Project).to receive(:open).and_return(mock_project)
      expect(mock_project).to receive(:slather_setup_for_coverage)
      expect(mock_project).to receive(:save)

      # Execute the post_install hook via CocoaPods
      sandbox_root = 'Pods'
      sandbox = Pod::Sandbox.new(sandbox_root)
      context = Pod::Installer::HooksContext.generate(sandbox, [])
      Pod::HooksManager.run(:post_install, context)
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
slather-1.5.5 spec/slather/cocoapods_plugin_spec.rb
slather-1.5.4 spec/slather/cocoapods_plugin_spec.rb
slather-1.5.3 spec/slather/cocoapods_plugin_spec.rb
slather-1.5.2 spec/slather/cocoapods_plugin_spec.rb
slather-1.5.1 spec/slather/cocoapods_plugin_spec.rb
slather-1.5.0 spec/slather/cocoapods_plugin_spec.rb
slather-1.4.0 spec/slather/cocoapods_plugin_spec.rb