Sha256: 530225e70f738c3860223c8268a989b6e58b8c7f2391d82811ec8a9781011b45
Contents?: true
Size: 541 Bytes
Versions: 36
Compression:
Stored size: 541 Bytes
Contents
require 'spec_helper' describe Hashie::Extensions::MergeInitializer do class MergeInitializerHash < Hash include Hashie::Extensions::MergeInitializer end subject { MergeInitializerHash } it 'initializes with no arguments' do expect(subject.new).to eq({}) end it 'initializes with a hash' do expect(subject.new(abc: 'def')).to eq(abc: 'def') end it 'initializes with a hash and a default' do h = subject.new({ abc: 'def' }, 'bar') expect(h[:foo]).to eq 'bar' expect(h[:abc]).to eq 'def' end end
Version data entries
36 entries across 33 versions & 6 rubygems