Sha256: b5147c38e7252d7b55f6e77aee7142e85a0bbf38d650b1321fbf0938be44467d

Contents?: true

Size: 821 Bytes

Versions: 17

Compression:

Stored size: 821 Bytes

Contents

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

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::PostInstallHooksContext.generate(sandbox, mock_project, [])
      Pod::HooksManager.run(:post_install, context, {'slather' => nil})
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
slather-2.8.5 spec/slather/cocoapods_plugin_spec.rb
slather-2.8.4 spec/slather/cocoapods_plugin_spec.rb
slather-2.8.3 spec/slather/cocoapods_plugin_spec.rb
slather-2.8.2 spec/slather/cocoapods_plugin_spec.rb
slather-2.8.1 spec/slather/cocoapods_plugin_spec.rb
slather-2.8.0 spec/slather/cocoapods_plugin_spec.rb
slather-2.7.5 spec/slather/cocoapods_plugin_spec.rb
slather-2.7.4 spec/slather/cocoapods_plugin_spec.rb
slather-2.7.3 spec/slather/cocoapods_plugin_spec.rb
slather-2.7.2 spec/slather/cocoapods_plugin_spec.rb
slather-2.7.1 spec/slather/cocoapods_plugin_spec.rb
slather-2.7.0 spec/slather/cocoapods_plugin_spec.rb
slather-2.6.1 spec/slather/cocoapods_plugin_spec.rb
slather-2.6.0 spec/slather/cocoapods_plugin_spec.rb
slather-2.5.0 spec/slather/cocoapods_plugin_spec.rb
slather-2.4.9 spec/slather/cocoapods_plugin_spec.rb
slather-2.4.8 spec/slather/cocoapods_plugin_spec.rb