Sha256: 72a8509578c752308b94fff7df99904efe029a9aab9d01bdffa8253d7ab6e327

Contents?: true

Size: 612 Bytes

Versions: 5

Compression:

Stored size: 612 Bytes

Contents

shared_context "stubbed memory_consumption" do
  let(:current_memory_consumption) { 123456 }

  before { subject.stub(:current_memory_consumption).and_return(current_memory_consumption) }
end

shared_context "frozen time" do
  let!(:now) do
    Time.now.tap do |now|
      Time.stub(:now).and_return(now)
    end
  end
end

shared_context "job processing" do
  let(:item) { double(:item) }
  let(:index) { 0 }
  let(:retry_interval)  { job.class.retry_interval }
  let(:maximum_retries) { job.class.maximum_retries }

  before do
    Kernel.stub(:sleep)
    job.stub(:each_item).and_yield(item, index)
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
massive-0.4.0 spec/shared/step_context.rb
massive-0.3.0 spec/shared/step_context.rb
massive-0.2.0 spec/shared/step_context.rb
massive-0.1.1 spec/shared/step_context.rb
massive-0.1.0 spec/shared/step_context.rb