Sha256: 134f47c938fffa6ad292b9ca5916100063361c4044e16564ad66f98648e6891a

Contents?: true

Size: 792 Bytes

Versions: 15

Compression:

Stored size: 792 Bytes

Contents

require 'spec_helper'

describe PerfectQueue::Runner do
  describe '#new' do
    it 'creates with task' do
      expect(PerfectQueue::Runner.new(double('task'))).to be_a(PerfectQueue::Runner)
    end
  end

  describe '#task' do
    let (:task) { double('task') }
    let (:runner) { PerfectQueue::Runner.new(task) }
    it 'returns given task' do
      expect(runner.task).to eq(task)
    end
  end

  describe '#queue' do
    let (:runner) { PerfectQueue::Runner.new(double('task', client: 1)) }
    it 'returns a queue' do
      queue = runner.queue
      expect(queue).to be_a(PerfectQueue::Queue)
    end
  end

  describe '#kill' do
    let (:runner) { PerfectQueue::Runner.new(double('task')) }
    it 'always returns nil' do
      expect(runner.kill(nil)).to be_nil
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
perfectqueue-0.8.54 spec/runner_spec.rb
perfectqueue-0.10.1 spec/runner_spec.rb
perfectqueue-0.8.53 spec/runner_spec.rb
perfectqueue-0.8.52 spec/runner_spec.rb
perfectqueue-0.10.0 spec/runner_spec.rb
perfectqueue-0.8.51 spec/runner_spec.rb
perfectqueue-0.8.50 spec/runner_spec.rb
perfectqueue-0.9.2 spec/runner_spec.rb
perfectqueue-0.9.1 spec/runner_spec.rb
perfectqueue-0.9.0 spec/runner_spec.rb
perfectqueue-0.8.49 spec/runner_spec.rb
perfectqueue-0.8.48 spec/runner_spec.rb
perfectqueue-0.8.47 spec/runner_spec.rb
perfectqueue-0.8.46 spec/runner_spec.rb
perfectqueue-0.8.45 spec/runner_spec.rb