diff --git a/spec/datadog/tracing/contrib/rails/cache_spec.rb b/spec/datadog/tracing/contrib/rails/cache_spec.rb index 998d3ef0a17..4b3f79c2944 100644 --- a/spec/datadog/tracing/contrib/rails/cache_spec.rb +++ b/spec/datadog/tracing/contrib/rails/cache_spec.rb @@ -118,16 +118,16 @@ .to eq('cache') end - context 'when cache_key_enabled is false' do + context 'when cache_key.enabled is false' do before do - Datadog.configuration.tracing[:active_support][:cache_key_enabled] = false + Datadog.configuration.tracing[:active_support][:cache_key].enabled = false end it do expect(read).to eq(50) expect(spans).to have(2).items - get = spans + get, = spans expect(get.name).to eq('rails.cache') expect(get.get_tag('rails.cache.key')).to be_nil end @@ -165,9 +165,9 @@ end end - context 'when cache_key_enabled is false' do + context 'when cache_key.enabled is false' do before do - Datadog.configuration.tracing[:active_support][:cache_key_enabled] = false + Datadog.configuration.tracing[:active_support][:cache_key].enabled = false end it do @@ -221,15 +221,15 @@ end end - context 'when cache_key_enabled is false' do + context 'when cache_key.enabled is false' do before do - Datadog.configuration.tracing[:active_support][:cache_key_enabled] = false + Datadog.configuration.tracing[:active_support][:cache_key].enabled = false end let(:key) { ['custom-key', %w[x y], user] } let(:user) { double('User', cache_key: 'User:3') } - it 'does not expand key using ActiveSupport when cache_key_enabled false' do + it 'does not expand key using ActiveSupport when cache_key.enabled false' do write expect(span.get_tag('rails.cache.key')).to be_nil end @@ -284,9 +284,9 @@ end end - context 'when cache_key_enabled is false' do + context 'when cache_key.enabled is false' do before do - Datadog.configuration.tracing[:active_support][:cache_key_enabled] = false + Datadog.configuration.tracing[:active_support][:cache_key].enabled = false end it do @@ -343,9 +343,9 @@ .to eq('cache') end - context 'when cache_key_enabled is false' do + context 'when cache_key.enabled is false' do before do - Datadog.configuration.tracing[:active_support][:cache_key_enabled] = false + Datadog.configuration.tracing[:active_support][:cache_key].enabled = false end it do @@ -392,9 +392,9 @@ end end - context 'when cache_key_enabled is false' do + context 'when cache_key.enabled is false' do before do - Datadog.configuration.tracing[:active_support][:cache_key_enabled] = false + Datadog.configuration.tracing[:active_support][:cache_key].enabled = false end subject(:fetch) { cache.fetch('exception') { raise 'oops' } } @@ -452,9 +452,9 @@ end end - context 'with exception and when cache_key_enabled is false' do + context 'with exception and when cache_key.enabled is false' do before do - Datadog.configuration.tracing[:active_support][:cache_key_enabled] = false + Datadog.configuration.tracing[:active_support][:cache_key].enabled = false end subject(:fetch_multi) { cache.fetch_multi('exception', 'another', 'one') { raise 'oops' } } @@ -514,9 +514,9 @@ end end - context 'with very large cache key and when cache_key_enabled is false' do + context 'with very large cache key and when cache_key.enabled is false' do before do - Datadog.configuration.tracing[:active_support][:cache_key_enabled] = false + Datadog.configuration.tracing[:active_support][:cache_key].enabled = false end it 'truncates key too large' do max_key_size = Datadog::Tracing::Contrib::ActiveSupport::Ext::QUANTIZE_CACHE_MAX_KEY_SIZE