sinatra/test
Blake Mizerany e20797047d passing a block to #pass will not 404, but eval the block
This is huge for writing extensions that install routes.
The developer can set the block to do default behaviour
if the app that registered the extension has not, or does
not want to, customize the route.

example:

  # MyFooExt
  ...
  def self.registered(app)
    app.get "/foo" do
      do_foo_things
      pass do
        "You hit foo!"
      end
    end
  end

At this point, as the user of MyFooExt, I can let the default
behaviour happen or override:

  # MySinatraApp
  require 'sinatra/my_foo_ext'

  class MySinatraApp < Sinatra::Base
    register MyFooExt

    get "/foo" do
      # MyFooExt has done do_foo_things
      do_our_foo_things
      "All foo things done"
    end
  end
2009-12-13 20:50:12 -08:00
..
data I knew I shoulda taken that left turn at Hoboken 2008-12-20 18:45:28 -08:00
views ERubis support in to sinatra. With tests! 2009-10-18 01:04:54 +02:00
base_test.rb Less warnings to sate zenspider's needs 2009-05-18 03:36:03 -07:00
builder_test.rb Deprecation warning for auto-require of template engines 2009-05-18 02:47:36 -07:00
contest.rb Less warnings to sate zenspider's needs 2009-05-18 03:36:03 -07:00
erb_test.rb Use contest instead of test/spec/mini 2009-03-31 02:23:48 -07:00
erubis_test.rb ERubis support in to sinatra. With tests! 2009-10-18 01:04:54 +02:00
extensions_test.rb Get rid of Default 2009-10-18 01:18:53 +02:00
filter_test.rb Adds after filters 2009-11-11 07:32:10 -08:00
haml_test.rb closes #9779 Auto-require haml/erb/builder/sass 2009-04-24 17:59:39 -07:00
helper.rb Use Rack::Test instead of Sinatra::Test for tests 2009-05-18 02:51:44 -07:00
helpers_test.rb Allow to register a mime type with mime_type 2009-10-12 02:02:07 -07:00
mapped_error_test.rb Better error mapping inheritance 2009-06-07 04:12:20 -07:00
middleware_test.rb Get rid of Default 2009-10-18 01:18:53 +02:00
options_test.rb Get rid of Default 2009-10-18 01:18:53 +02:00
request_test.rb request.secure? to check for ssl encrypted connection 2009-08-18 13:48:46 +02:00
response_test.rb Use contest instead of test/spec/mini 2009-03-31 02:23:48 -07:00
result_test.rb Use contest instead of test/spec/mini 2009-03-31 02:23:48 -07:00
route_added_hook_test.rb Added proc as argument for #route_added hook 2009-04-19 20:04:50 -07:00
routing_test.rb passing a block to #pass will not 404, but eval the block 2009-12-13 20:50:12 -08:00
sass_test.rb Deprecation warning for auto-require of template engines 2009-05-18 02:47:36 -07:00
server_test.rb Use rack's new handler registration stuff to fix some failing specs 2009-05-20 18:13:38 -07:00
sinatra_test.rb Use contest instead of test/spec/mini 2009-03-31 02:23:48 -07:00
static_test.rb Better route and filter inheritance [#180] 2009-06-07 04:11:14 -07:00
templates_test.rb Use Tilt for templating 2009-10-03 23:55:03 +02:00