File tree Expand file tree Collapse file tree 2 files changed +27
-1
lines changed
Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,8 @@ def initialize(options = {}, &block)
5252 @extra = options [ :extra ] || { }
5353 @extra . merge! ( context . extra )
5454
55- @tags = @configuration . tags
55+ @tags = { }
56+ @tags . merge! ( @configuration . tags )
5657 @tags . merge! ( options [ :tags ] || { } )
5758 @tags . merge! ( context . tags )
5859
Original file line number Diff line number Diff line change 200200 end
201201 end
202202
203+ context 'configuration tags unspecified' do
204+ it 'should not persist tags between unrelated events' do
205+ config = Raven ::Configuration . new
206+
207+ Raven ::Event . new (
208+ :level => 'warning' ,
209+ :logger => 'foo' ,
210+ :tags => {
211+ 'foo' => 'bar'
212+ } ,
213+ :server_name => 'foo.local' ,
214+ :configuration => config
215+ )
216+
217+ hash = Raven ::Event . new (
218+ :level => 'warning' ,
219+ :logger => 'foo' ,
220+ :server_name => 'foo.local' ,
221+ :configuration => config
222+ ) . to_hash
223+
224+ expect ( hash [ 'tags' ] ) . to eq ( { } )
225+ end
226+ end
227+
203228 describe '.initialize' do
204229 it 'should not touch the env object for an ignored environment' do
205230 Raven . configure ( true ) do |config |
You can’t perform that action at this time.
0 commit comments