Sha256: 880ab9395087b35a633c24a04f6bb004e9a51af48266a25fe6acc4ff13a1f70d

Contents?: true

Size: 702 Bytes

Versions: 4

Compression:

Stored size: 702 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

4 entries across 4 versions & 2 rubygems

Version Path
scheduler_daemon-1.1.3 spec/scheduler_spec.rb
scheduler_daemon_robertcigan-1.1.3 spec/scheduler_spec.rb
scheduler_daemon-1.1.2 spec/scheduler_spec.rb
scheduler_daemon-1.1.1 spec/scheduler_spec.rb