Sha256: c2c75690f17393d92f577f85ce5519b4590392d694d32129b0219c691a3769f4

Contents?: true

Size: 670 Bytes

Versions: 3

Compression:

Stored size: 670 Bytes

Contents

# -*- encoding : utf-8 -*-
describe Pacto do
  describe '.configure' do
    let(:contracts_path) { 'path_to_contracts' }

    it 'allows contracts_path manual configuration' do
      expect(described_class.configuration.contracts_path).to eq('.')
      described_class.configure do |c|
        c.contracts_path = contracts_path
      end
      expect(described_class.configuration.contracts_path).to eq(contracts_path)
    end

    it 'register a Pacto Hook' do
      hook_block = Pacto::Hook.new {}
      described_class.configure do |c|
        c.register_hook(hook_block)
      end
      expect(described_class.configuration.hook).to eq(hook_block)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
pacto-0.4.0.rc3 spec/unit/pacto/core/configuration_spec.rb
pacto-0.4.0.rc2 spec/unit/pacto/core/configuration_spec.rb
pacto-0.4.0.rc1 spec/unit/pacto/core/configuration_spec.rb