Sha256: fbc9ac9398d4329b7c594f4803edfe1af159fbb2305f2c7ece9f95a49928c552

Contents?: true

Size: 776 Bytes

Versions: 2

Compression:

Stored size: 776 Bytes

Contents

require 'spec_helper'

describe PuppetfileFixturesGenerator do
  it 'has a version number' do
    expect(PuppetfileFixturesGenerator::VERSION).not_to be nil
  end

  describe '#diff and #hash_differ' do
    let(:puppetfile) { './spec/fixtures/Puppetfile' }
    let(:matching_diff) { './spec/fixtures/matching_diffs/.fixtures.yml' }
    let(:nonmatching_diff) { './spec/fixtures/nonmatching_diffs/.fixtures.yml' }
    context 'test diffs' do
      it 'matching diff' do
        results = PuppetfileFixturesGenerator.diff(puppetfile, matching_diff)
        expect(results[0]).to eq(true)
      end
      it 'nonmatching diff' do
        results = PuppetfileFixturesGenerator.diff(puppetfile, nonmatching_diff)
        expect(results[0]).to eq(false)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
puppetfile_fixtures_generator-0.2.1 spec/puppetfile_fixtures_generator_spec.rb
puppetfile_fixtures_generator-0.2.0 spec/puppetfile_fixtures_generator_spec.rb