Sha256: bb9bb038ae6512bec0bc576058ccb666fe2105454ef7d25317aa0164e0286ade

Contents?: true

Size: 701 Bytes

Versions: 2

Compression:

Stored size: 701 Bytes

Contents

require File.dirname(__FILE__) + '/spec_helper'
require 'scheduler_daemon/base'

describe Scheduler::Base do
  before(:each) do
    @scheduler = Scheduler::Base.new(:skip_init => true, :silent => true)
    @scheduler.stub(:log)
  end

  describe 'decide_what_to_run' do
    it "should support --only" do
      @scheduler = Scheduler::Base.new({:skip_init => true, :silent => true}, ['--only=alphabets'])
      @scheduler.options['only'].should == ['alphabets']
    end

    it "should support --except" do
      @scheduler = Scheduler::Base.new({:skip_init => true, :silent => true}, ['--except=balloons,monkeys'])
      @scheduler.options['except'].should == ['balloons', 'monkeys']
    end
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
scheduler_daemon-1.1.5 spec/scheduler_spec.rb
scheduler_daemon_3lancers-1.1.5 spec/scheduler_spec.rb