Sha256: 631cdc906e261328c2ca037ae3289e8ffc936ba70d85d1a705747e59f37a2f17

Contents?: true

Size: 926 Bytes

Versions: 27

Compression:

Stored size: 926 Bytes

Contents

require 'spec_helper'

describe Taskinator::Executor do

  let(:definition) do
    Module.new do
      def method; end
    end
  end

  let(:task) { double('task') }
  subject { Taskinator::Executor.new(definition, task) }

  describe "helpers" do
    it "#process_uuid" do
      expect(task).to receive(:process_uuid)
      subject.process_uuid
    end

    it "#uuid" do
      expect(task).to receive(:uuid)
      subject.uuid
    end

    it "#options" do
      expect(task).to receive(:options)
      subject.options
    end
  end

  it "should mixin definition" do
    expect(subject).to be_a(definition)
  end

  it "should mixin definition for the instance only" do
    expect(Taskinator::Executor).to_not be_a(definition)
  end

  it "should assign definition" do
    expect(subject.definition).to eq(definition)
  end

  it "should contain definition methods" do
    expect(subject).to respond_to(:method)
  end

end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
taskinator-0.5.2 spec/taskinator/executor_spec.rb
taskinator-0.5.1 spec/taskinator/executor_spec.rb
taskinator-0.5.0 spec/taskinator/executor_spec.rb
taskinator-0.4.7 spec/taskinator/executor_spec.rb
taskinator-0.4.6 spec/taskinator/executor_spec.rb
taskinator-0.4.5 spec/taskinator/executor_spec.rb
taskinator-0.4.4 spec/taskinator/executor_spec.rb
taskinator-0.4.3 spec/taskinator/executor_spec.rb
taskinator-0.4.2 spec/taskinator/executor_spec.rb
taskinator-0.4.1 spec/taskinator/executor_spec.rb
taskinator-0.4.0 spec/taskinator/executor_spec.rb
taskinator-0.3.16 spec/taskinator/executor_spec.rb
taskinator-0.3.15 spec/taskinator/executor_spec.rb
taskinator-0.3.14 spec/taskinator/executor_spec.rb
taskinator-0.3.13 spec/taskinator/executor_spec.rb
taskinator-0.3.12 spec/taskinator/executor_spec.rb
taskinator-0.3.11 spec/taskinator/executor_spec.rb
taskinator-0.3.10 spec/taskinator/executor_spec.rb
taskinator-0.3.9 spec/taskinator/executor_spec.rb
taskinator-0.3.7 spec/taskinator/executor_spec.rb