Sha256: 2146a198e2c8081e76544661edc525f5ae38222ecc9691a5e965a80a72b3c034

Contents?: true

Size: 644 Bytes

Versions: 7

Compression:

Stored size: 644 Bytes

Contents

# encoding: utf-8
require 'spec_helper'

describe Rack::Harakiri do
  before(:each) do
    @app = stub :app
  end
  context "defaults" do
    before(:each) do
      @harakiri = Rack::Harakiri.new @app
    end
    it "should quit after an amount of requests" do
      @harakiri.quit_after_requests.should == 50
    end
  end
  context "with harakiri set" do
    before(:each) do
      Rack::Harakiri.after = 100
      @harakiri = Rack::Harakiri.new @app
    end
    after(:each) do
      Rack::Harakiri.after = nil
    end
    it "should quit after an amount of requests" do
      @harakiri.quit_after_requests.should == 100
    end
  end
  
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
picky-0.3.0 spec/lib/rack/harakiri_spec.rb
picky-0.2.4 spec/lib/rack/harakiri_spec.rb
picky-0.2.3 spec/lib/rack/harakiri_spec.rb
picky-0.2.2 spec/lib/rack/harakiri_spec.rb
picky-0.2.1 spec/lib/rack/harakiri_spec.rb
picky-0.2.0 spec/lib/rack/harakiri_spec.rb
picky-0.1.0 spec/lib/rack/harakiri_spec.rb