Sha256: b7282aa46fa2e52b54b03581f120602f176d7e9450d9b0c5f14a2ce9d845dac4

Contents?: true

Size: 1.2 KB

Versions: 14

Compression:

Stored size: 1.2 KB

Contents

require 'spec_helper'

describe Taskinator do
  subject { Taskinator }

  describe "#options" do
    it { expect(subject.options).to be_a(Hash) }
    it {
      options = { :a => 1, :b => 2 }
      subject.options = options
      expect(subject.options).to eq(options)
    }
  end

  describe "#configure" do
    it "yields to block" do
      block = SpecSupport::Block.new
      expect(block).to receive(:call).with(subject)
      subject.configure(&block)
    end
  end

  describe "#redis" do
    it "yields to block" do
      block = SpecSupport::Block.new
      expect(block).to receive(:call)
      subject.redis(&block)
    end

    it "raise error when no block" do
      expect {
        subject.redis
      }.to raise_error(ArgumentError)
    end
  end

  describe "#redis_pool" do
    it { expect(subject.redis_pool).to_not be_nil }
  end

  describe "#queue_config" do
    it {
      subject.queue_config = {:a => 1}
      expect(subject.queue_config).to eq({:a => 1})
    }
  end

  describe "#logger" do
    it { expect(subject.logger).to_not be_nil }
    it {
      logger = Logger.new(STDOUT)
      subject.logger = logger
      expect(subject.logger).to eq(logger)
      subject.logger = nil
    }
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
taskinator-0.0.15 spec/taskinator/intermodal_spec.rb
taskinator-0.0.14 spec/taskinator/intermodal_spec.rb
taskinator-0.0.13 spec/taskinator/intermodal_spec.rb
taskinator-0.0.12 spec/taskinator/intermodal_spec.rb
taskinator-0.0.11 spec/taskinator/intermodal_spec.rb
taskinator-0.0.10 spec/taskinator/intermodal_spec.rb
taskinator-0.0.9 spec/taskinator/intermodal_spec.rb
taskinator-0.0.8 spec/taskinator/intermodal_spec.rb
taskinator-0.0.7 spec/taskinator/intermodal_spec.rb
taskinator-0.0.5 spec/taskinator/intermodal_spec.rb
taskinator-0.0.4 spec/taskinator/intermodal_spec.rb
taskinator-0.0.3 spec/taskinator/intermodal_spec.rb
taskinator-0.0.2 spec/taskinator/intermodal_spec.rb
taskinator-0.0.1 spec/taskinator/intermodal_spec.rb