Sha256: 100f9c1d96a74809147aa867755f972e942a7a45105267395d12504c18fb84ee

Contents?: true

Size: 1.02 KB

Versions: 4

Compression:

Stored size: 1.02 KB

Contents

require 'rspec'
require 'linepipe'

describe Linepipe do
  describe '.develop' do
    it 'creates a new linepipe process in development mode' do
      process = Linepipe::Process.new
      Linepipe::Process.stub(:new).and_return process

      process.should_receive(:instance_eval)
      process.should_receive(:develop)

      expect(Linepipe.develop {}).to eq(process)
    end
  end

  describe '.run' do
    it 'creates a new linepipe process in run mode' do
      process = Linepipe::Process.new
      Linepipe::Process.stub(:new).and_return process

      process.should_receive(:instance_eval)
      process.should_receive(:run)

      expect(Linepipe.run {}).to eq(process)
    end
  end

  describe '.benchmark' do
    it 'creates a new linepipe process in benchmark mode' do
      process = Linepipe::Process.new
      Linepipe::Process.stub(:new).and_return process

      process.should_receive(:instance_eval)
      process.should_receive(:benchmark).with(2)

      expect(Linepipe.benchmark(2) {}).to eq(process)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
linepipe-0.2.0 spec/pipeline_spec.rb
linepipe-0.1.2 spec/pipeline_spec.rb
linepipe-0.1.1 spec/pipeline_spec.rb
linepipe-0.1.0 spec/pipeline_spec.rb