spec/logging_spec.rb in ougai-1.5.5 vs spec/logging_spec.rb in ougai-1.5.6
- old
+ new
@@ -1,18 +1,18 @@
require 'spec_helper'
describe Ougai::Logging do
- describe '#merge_fields' do
+ describe '#weak_merge!' do
let(:target) { m = described_class; Class.new{ include m }.new }
it 'merges with unique elements in array' do
result = nil
target.instance_eval do
- result = merge_fields({ foo: [1, 2], bar: 'base', baz: ['A'] },
- { foo: [2, 3], bar: 'over', baz: ['B'] })
+ result = weak_merge!({ foo: [1, 2], bar: 'base', baz: ['A'] },
+ { foo: [2, 3], bar: 'inferior', baz: ['B'] })
end
- expect(result[:foo]).to eq([1, 2, 3])
- expect(result[:bar]).to eq('over')
- expect(result[:baz]).to eq(['A', 'B'])
+ expect(result[:foo]).to eq([2, 3, 1])
+ expect(result[:bar]).to eq('base')
+ expect(result[:baz]).to eq(['B', 'A'])
end
end
end