Sha256: 5f74477edc4dd14d5537b78e4a19c4573126817591547708ba38fa16ae2a8764
Contents?: true
Size: 1010 Bytes
Versions: 11
Compression:
Stored size: 1010 Bytes
Contents
require 'spec_helper' require 'job_helper' describe Marty::Diagnostic::DelayedJobVersion do # used to stub request object class DummyRequest attr_accessor :params, :port def initialize @params = {} end end before(:each) do Marty::Script.load_scripts(nil, Time.zone.today) allow(described_class).to receive(:scope).and_return(nil) end def sample_data { Marty::Helper.my_ip => { 'Version' => { 'description' => Marty::VERSION, 'status' => true, 'consistent' => nil }, } } end it 'can detect if all workers are running correct application version' do ENV['DELAYED_VER'] = Marty::VERSION start_delayed_job expect(described_class.generate).to eq(sample_data) stop_delayed_job end it 'will fail if DELAYED_VER is not set' do ENV.delete('DELAYED_VER') start_delayed_job expect { described_class.generate }.to raise_error(RuntimeError) stop_delayed_job end end
Version data entries
11 entries across 11 versions & 1 rubygems