Sha256: 9b85180fdf12d79c60d64578ef62d38df8a261b1972e1dc21faccba3ca3f3b3e
Contents?: true
Size: 771 Bytes
Versions: 24
Compression:
Stored size: 771 Bytes
Contents
require 'spec_helper' describe DashingContrib::RunnableJob do describe 'Common States' do it { expect(DashingContrib::RunnableJob::WARNING).to eq 'warning' } it { expect(DashingContrib::RunnableJob::CRITICAL).to eq 'critical' } it { expect(DashingContrib::RunnableJob::OK).to eq 'ok' } end describe '#run' do context 'when event name is not provided' do it { expect { DashingContrib::RunnableJob.run }.to raise_exception(':event String is required to identify a job name') } end context 'when event name is provided' do let(:event_name) { 'test-event' } after(:each) { DashingContrib::RunnableJob.run(event: event_name) } it { expect(SCHEDULER).to receive(:every).with('30s', { first_in: 0 }) } end end end
Version data entries
24 entries across 24 versions & 1 rubygems