Sha256: 9bc26ec2ef0fe5a7f46fa43aca0598b1cc704a6eb0bb0cb852982757709b6fc0

Contents?: true

Size: 732 Bytes

Versions: 3

Compression:

Stored size: 732 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Yardstick, '.measure' do
  context 'when no arguments' do
    subject { described_class.measure }

    it 'delegates to Processor' do
      processor = double('processor')
      Yardstick::Processor.stub(:new).with(instance_of(Yardstick::Config)) do
        processor
      end
      processor.should_receive(:process)
      subject
    end
  end

  context 'when custom config' do
    subject { described_class.measure(config) }

    let(:config) { double('config') }

    it 'delegates to Processor' do
      processor = double('processor')
      Yardstick::Processor.stub(:new).with(config) { processor }
      processor.should_receive(:process)
      subject
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
yardstick-0.9.9 spec/unit/yardstick/class_methods/measure_spec.rb
yardstick-0.9.8 spec/unit/yardstick/class_methods/measure_spec.rb
yardstick-0.9.7 spec/unit/yardstick/class_methods/measure_spec.rb