foreplay 0.7.6 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,28 +0,0 @@
1
- require 'spec_helper'
2
- require 'foreplay'
3
-
4
- describe Foreplay::Utility do
5
- it 'should complain unless two hashes are passed to it' do
6
- expect { Foreplay::Utility.supermerge('x', 'y') }.to raise_error(RuntimeError)
7
- end
8
-
9
- it 'should merge two simple hashes' do
10
- expect(Foreplay::Utility.supermerge({ a: 'x' }, b: 'y')).to eq('a' => 'x', 'b' => 'y')
11
- end
12
-
13
- it 'should merge two hashes both with arrays at the same key' do
14
- expect(Foreplay::Utility.supermerge({ a: ['x'] }, a: ['y'])).to eq('a' => %w(x y))
15
- end
16
-
17
- it 'should merge an array and a value at the same key' do
18
- expect(Foreplay::Utility.supermerge({ a: 'x' }, a: ['y'])).to eq('a' => %w(x y))
19
- end
20
-
21
- it 'should replace a value at the same key' do
22
- expect(Foreplay::Utility.supermerge({ a: 'x' }, a: 'y')).to eq('a' => 'y')
23
- end
24
-
25
- it 'should merge two subhashes at the same key' do
26
- expect(Foreplay::Utility.supermerge({ a: { b: 'x' } }, a: { c: 'y' })).to eq('a' => { 'b' => 'x', 'c' => 'y' })
27
- end
28
- end