<commit_before>require 'spec_helper'

if (Gem::Version.new(Rails.version) >= Gem::Version.new('4.2.0'))
  context 'using rails4.2 and up' do
  
    require 'rollbar/delay/active_job'
  
    describe Rollbar::Delay::ActiveJob do
      describe '.call' do
        let(:payload) { {} }
        it 'calls Rollbar' do
          expect(Rollbar).to receive(:process_from_async_handler).with(payload)
    
          Rollbar::Delay::ActiveJob.call(payload)
        end<commit_msg>759: in rails 5 the default aj queue adapter was changed to :async instead of :inline; make sure :inline is being used in the test so expectations are met<commit_after>require 'spec_helper'

if (Gem::Version.new(Rails.version) >= Gem::Version.new('4.2.0'))
  context 'using rails4.2 and up' do
  
    require 'rollbar/delay/active_job'
  
    describe Rollbar::Delay::ActiveJob do
      describe '.call' do
        let(:payload) { {} }
        it 'calls Rollbar' do
          Rails.application.config.active_job.queue_adapter = :inline
          expect(Rollbar).to receive(:process_from_async_handler).with(payload)
          Rollbar::Delay::ActiveJob.call(payload)
        end
{'fraction_non_alphanumeric': 0.11933797909407666, 'fraction_numerical': 0.012195121951219513, 'mean_word_length': 3.2398523985239853, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7134307', 'n_tokens_mistral': 357, 'n_tokens_neox': 352, 'n_words': 85}