Sha256: c28817a82fd611784ca830e7f9ddddd98285ed7c9051af4d3b426f4dd865f194
Contents?: true
Size: 1002 Bytes
Versions: 43
Compression:
Stored size: 1002 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, Date.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
43 entries across 43 versions & 1 rubygems