Sha256: 62c0122b667ae02cf5500c9a34877dcfe38e455b0b119878632883ca2a136386

Contents?: true

Size: 1.14 KB

Versions: 11

Compression:

Stored size: 1.14 KB

Contents

require 'spec_helper'

shared_examples 'a lockfile' do
  let(:lockfile_hash) { lockfile.to_h }

  it 'should have a version' do
    lockfile_hash['version'].should eql LockJar::VERSION
  end

  it 'should have a excludes' do
    if respond_to? :expected_excludes
      lockfile_hash['excludes'].should eql expected_excludes
    end
  end

  it 'should have a local repository' do
    if respond_to? :expected_local_repository
      expect(lockfile_hash['local_repository']).to(eql(expected_local_repository))
    end
  end

  it 'should have a maps' do
    expect(lockfile_hash['maps']).to(eql(expected_map)) if respond_to? :expected_map
  end

  it 'should have remote repositories' do
    lockfile_hash['remote_repositories'].should eql expected_remote_repositories
  end

  context 'for groups' do
    let(:groups) { lockfile_hash['groups'] }

    it 'should have default' do
      groups['default'].should eql expected_groups['default']
    end

    it 'should match development' do
      groups['development'].should eql expected_groups['development']
    end

    it 'should match test' do
      groups['test'].should eql expected_groups['test']
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
lock_jar-0.15.2 spec/support/shared_examples/lockfile.rb
lock_jar-0.15.1 spec/support/shared_examples/lockfile.rb
lock_jar-0.15.0 spec/support/shared_examples/lockfile.rb
lock_jar-0.14.7 spec/support/shared_examples/lockfile.rb
lock_jar-0.14.6 spec/support/shared_examples/lockfile.rb
lock_jar-0.14.5 spec/support/shared_examples/lockfile.rb
lock_jar-0.14.4 spec/support/shared_examples/lockfile.rb
lock_jar-0.14.3 spec/support/shared_examples/lockfile.rb
lock_jar-0.14.2 spec/support/shared_examples/lockfile.rb
lock_jar-0.14.1 spec/support/shared_examples/lockfile.rb
lock_jar-0.14.0 spec/support/shared_examples/lockfile.rb