spec/limiters/hourly_spec.rb in improved-rack-throttle-0.7.1 vs spec/limiters/hourly_spec.rb in improved-rack-throttle-0.8.0

- old
+ new

@@ -8,20 +8,20 @@ @app ||= Rack::Throttle::Hourly.new(@target_app, :max_per_hour => 3) end it "should be allowed if not seen this hour" do get "/foo" - last_response.body.should show_allowed_response + expect(last_response.body).to show_allowed_response end - + it "should be allowed if seen fewer than the max allowed per hour" do 2.times { get "/foo" } - last_response.body.should show_allowed_response + expect(last_response.body).to show_allowed_response end - + it "should not be allowed if seen more times than the max allowed per hour" do 4.times { get "/foo" } - last_response.body.should show_throttled_response + expect(last_response.body).to show_throttled_response end - + # TODO mess with time travelling and requests to make sure no overlap end