Sha256: c38c7557cec37d87205bd7498c9552d8b2c11cfe8c4ee3a48c419b648b9cf14a
Contents?: true
Size: 682 Bytes
Versions: 2
Compression:
Stored size: 682 Bytes
Contents
require 'spec_helper' describe LoggerWare::Collector do include LoggerWare::Collector E = { 'A' => 'a', 'B' => {'C' => 'c', 'D' => 'd'}, 'F' => false, 'N' => nil, } describe :collect do it 'should return empty hash when no params match' do collect(E).should == {} end it 'should collect params' do collect(E, {a: 'A'}).should == {a: 'a'} end it 'should collect false and nil' do collect(E, {f: 'F', n: 'N'}).should == {f: false, n: nil} end it 'should filter' do collect(E, {a: 'A'}, {b: 'B'}, [/D/], 'XXX').should == { a: 'a', b: {'C' => 'c', 'D' => 'XXX'} } end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
logger_ware-0.0.2 | spec/lib/logger_ware/collector_spec.rb |
logger_ware-0.0.1 | spec/lib/logger_ware/collector_spec.rb |