Sha256: 732a7f5c8a447d65338e0338f527749d9ec2025d3cce21197a44915eef54e614

Contents?: true

Size: 550 Bytes

Versions: 12

Compression:

Stored size: 550 Bytes

Contents

require 'spec_helper'

describe Ougai::Logging do
  describe '#merge_fields' 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'] })
      end
      expect(result[:foo]).to eq([1, 2, 3])
      expect(result[:bar]).to eq('over')
      expect(result[:baz]).to eq(['A', 'B'])
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
ougai-1.5.5 spec/logging_spec.rb
ougai-1.5.4 spec/logging_spec.rb
ougai-1.5.3 spec/logging_spec.rb
ougai-1.5.2 spec/logging_spec.rb
ougai-1.5.0 spec/logging_spec.rb
ougai-1.4.4 spec/logging_spec.rb
ougai-1.4.3 spec/logging_spec.rb
ougai-1.4.2 spec/logging_spec.rb
ougai-1.4.1 spec/logging_spec.rb
ougai-1.4.0 spec/logging_spec.rb
ougai-1.3.0 spec/logging_spec.rb
ougai-1.2.0 spec/logging_spec.rb