source: other-projects/hathitrust/vagrant-solr-cluster/trunk/modules/stdlib/spec/acceptance/deep_merge_spec.rb@ 30960

Last change on this file since 30960 was 30960, checked in by davidb, 7 years ago

Switch to using Puppet to provision machine. Strongly based on files developed for spark-hdfs cluster

  • Property svn:executable set to *
File size: 659 bytes
Line 
1#! /usr/bin/env ruby -S rspec
2require 'spec_helper_acceptance'
3
4describe 'deep_merge function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
5 describe 'success' do
6 it 'should deep merge two hashes' do
7 pp = <<-EOS
8 $hash1 = {'one' => 1, 'two' => 2, 'three' => { 'four' => 4 } }
9 $hash2 = {'two' => 'dos', 'three' => { 'five' => 5 } }
10 $merged_hash = deep_merge($hash1, $hash2)
11
12 if $merged_hash != { 'one' => 1, 'two' => 'dos', 'three' => { 'four' => 4, 'five' => 5 } } {
13 fail("Hash was incorrectly merged.")
14 }
15 EOS
16
17 apply_manifest(pp, :catch_failures => true)
18 end
19 end
20end
Note: See TracBrowser for help on using the repository browser.