Skip to content

Commit

Permalink
fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
christoph-buente committed Sep 8, 2009
1 parent 7ac0ad4 commit f744acc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/test_api_throttling.rb
@@ -1,5 +1,5 @@
require 'redis'
require File.expand_path(File.dirname(__FILE__) + '/test_helper')
require 'redis'

# To Run this test, you need to have the redis-server running.
# And you need to have rack-test gem installed: sudo gem install rack-test
Expand Down Expand Up @@ -94,7 +94,7 @@ def app
context "with path restriction :only" do
def app
app = Rack::Builder.new {
use ApiThrottling, :requests_per_hour => 3, :only => '/awesome'
use ApiThrottling, :requests_per_hour => 3, :only => '/awesome', :auth => false
run lambda {|env| [200, {'Content-Type' => 'text/plain', 'Content-Length' => '12'}, ["Hello World!"] ] }
}
end
Expand All @@ -119,7 +119,7 @@ def app
context "with path restrictions :except" do
def app
app = Rack::Builder.new {
use ApiThrottling, :requests_per_hour => 3, :except => '/awesome'
use ApiThrottling, :requests_per_hour => 3, :except => '/awesome', :auth => false
run lambda {|env| [200, {'Content-Type' => 'text/plain', 'Content-Length' => '12'}, ["Hello World!"] ] }
}
end
Expand All @@ -144,7 +144,7 @@ def app
context "with path rescrictions :only and :except" do
def app
app = Rack::Builder.new {
use ApiThrottling, :requests_per_hour => 3, :only => '/awesome', :except => '/awesome/foo'
use ApiThrottling, :requests_per_hour => 3, :only => '/awesome', :except => '/awesome/foo', :auth => false
run lambda {|env| [200, {'Content-Type' => 'text/plain', 'Content-Length' => '12'}, ["Hello World!"] ] }
}
end
Expand Down

0 comments on commit f744acc

Please sign in to comment.