mirror of
https://github.com/samsonjs/rack-attack.git
synced 2026-03-25 09:25:49 +00:00
18 lines
350 B
Ruby
18 lines
350 B
Ruby
require_relative 'spec_helper'
|
|
|
|
describe 'Rack::Attack' do
|
|
include Rack::Test::Methods
|
|
|
|
def app
|
|
Rack::Builder.new {
|
|
use Rack::Attack
|
|
run lambda {|env| [200, {}, ['Hello World']]}
|
|
}.to_app
|
|
end
|
|
|
|
it "says hello" do
|
|
get '/'
|
|
last_response.status.must_equal 200
|
|
last_response.body.must_equal 'Hello World'
|
|
end
|
|
end
|