spec/rollbar_spec.rb in rollbar-1.4.2 vs spec/rollbar_spec.rb in rollbar-1.4.3

- old
+ new

@@ -1579,9 +1579,24 @@ expect(Thread.main[:inner_scope]).to be_eql(scope) end end end + describe '.scope!' do + let(:new_scope) do + { :person => { :id => 1 } } + end + + before { reconfigure_notifier } + + it 'adds the new scope to the payload options' do + configuration = Rollbar.notifier.configuration + Rollbar.scope!(new_scope) + + expect(configuration.payload_options).to be_eql(new_scope) + end + end + describe '.reset_notifier' do it 'resets the notifier' do notifier1_id = Rollbar.notifier.object_id Rollbar.reset_notifier!