Sha256: 05b62da8e9d5b28ae7230fa3f84bfbb29796214551f9c24b3a108a75c9e26e89

Contents?: true

Size: 807 Bytes

Versions: 6

Compression:

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

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
slather-2.0.2 spec/slather/cocoapods_plugin_spec.rb
slather-2.0.1 spec/slather/cocoapods_plugin_spec.rb
slather-2.0.0 spec/slather/cocoapods_plugin_spec.rb
slather-1.8.3 spec/slather/cocoapods_plugin_spec.rb
ashtonw-slather-1.8.2 spec/slather/cocoapods_plugin_spec.rb
slather-1.8.1 spec/slather/cocoapods_plugin_spec.rb