Skip to content
Commits on Mar 9, 2013
  1. @rkh
Commits on Oct 11, 2011
  1. @timfel

    fix rdoc tests for 3.10

    timfel committed
Commits on Sep 17, 2011
  1. @rkh
Commits on May 11, 2011
  1. @rkh

    fix rdoc test, closes #270

    rkh committed
Commits on May 1, 2011
  1. @rkh

    start working on README tests

    rkh committed
Commits on Apr 15, 2011
  1. @rkh
Commits on Apr 13, 2011
  1. @rkh
Commits on Mar 13, 2011
  1. @rkh

    more tests for sessions

    rkh committed
Commits on Feb 21, 2011
  1. @rkh

    add some test guards for rbx

    rkh committed
Commits on Dec 24, 2010
  1. @rkh
Commits on Dec 23, 2010
  1. @rkh

    fix tests for rdoc 3.0

    rkh committed
Commits on Sep 27, 2010
  1. @rkh

    Sets default content type according to template engine used instead o…

    rkh committed
    …f just text/html.
    It does so by including a Mixin into the the returned string offering a content_type method. Therefore all of the following examples produce the expected results:
        # text/html
        get('/') do
          haml :index
        # text/css
        get('/') do
          sass :index
        # text/css
        get('/') do
          haml :index
          sass :index
        # text/html
        get('/') do
          haml '= sass :index'
    It also allows setting the default content type for a template engine:
        set :builder, :content_type => :html
    Tests and README adjustments (all languages) included.
Commits on May 18, 2009
  1. @sr @rtomayko
  2. @sr @rtomayko
Commits on Apr 25, 2009
  1. @rtomayko
  2. @bmizerany

    closes #9779 Auto-require haml/erb/builder/sass

    bmizerany committed
    this is causing thread-saftey issues.
Commits on Mar 31, 2009
  1. @sr @rtomayko

    Clean up options tests

    sr committed with rtomayko
  2. @sr @rtomayko

    Use contest instead of test/spec/mini

    sr committed with rtomayko
    See <> for more info. The
    contest.rb file is included under the test/ directory.
Commits on Mar 26, 2009
  1. @sr @rtomayko
Commits on Mar 2, 2009
  1. @bmizerany @rtomayko
Commits on Feb 22, 2009
  1. @sr
Commits on Feb 17, 2009
  1. @sr @rtomayko

    Add full test coverage for all options

    sr committed with rtomayko
    Test for host option
    Test for port option
    Test for server option
    Test for app_file option
    Test for the root option
    Test for the views option
    Test for the public option
    Test for reload option
    Test for lock option
    Tests for dump_errors, sessions, logging, and static options
    DRY-up options test setup
    Clean up tests for clean_trace options
    Test for run option
    Run options tests with default options
    Enable raise_errors options in test environment
  2. @sr @rtomayko
  3. @sr @rtomayko
Commits on Feb 3, 2009
  1. @rtomayko

    Make the specs run under new miniunit stuff in Ruby 1.9

    rtomayko committed
    * Rename Sinatra::Test#test_request to make_request. miniunit
      runs test_XXX methods included from modules.
    * Make describe/it work with miniunit -- all kinds of weirdness
Commits on Jan 31, 2009
  1. @bdimcheff @rtomayko
Commits on Jan 20, 2009
  1. @rtomayko
  2. @sr @rtomayko

    Convert tests to custom test/spec/mini [#87]

    sr committed with rtomayko
    The "spec" task has been removed and Rake's built in
    test helper is used to run specs now so we should be able to
    test with multiple installed versions of Ruby.
Commits on Jan 15, 2009
  1. @rtomayko

    Allow assertions in mock_app request context

    rtomayko committed
    I changed the ".should." style to use "fail" when we
    converted to test/unit style but I'd rather use asserts
Commits on Jan 14, 2009
  1. @rtomayko
  2. @rtomayko

    Test framework refactoring

    rtomayko committed
    * Adds test/helper.rb and moves mock_app and other code specific
      to testing the framework out of Sinatra::Test.
    * Do not require test/unit. The sinatra/test/unit,
      sinatra/test/spec, and sinatra/test/rspec files can be used to
      choose the framework.
    * Add Sinatra::TestHarness, which should act similar to the
      Rack::Session proposal here:
    * Update the README with information on using the different test
Commits on Dec 21, 2008
  1. @rtomayko

    I knew I shoulda taken that left turn at Hoboken

    rtomayko committed
    This is a fairly large reworking of Sinatra's innards. Although
    most of the internal implementation has been modified, it
    provides the same basic feature set and is meant to be compatible
    with Sinatra 0.3.2.
    * The Event and EventContext classes have been removed. Sinatra
      applications are now defined within the class context of a
      Sinatra::Base subclass; each request is processed within a new
    * Sinatra::Base can be used as a base class for multiple
      Rack applications within a single process and can be used as
      Rack middleware.
    * The routing and result type processing implementation has been
      simplified and enhanced a bit. There's a new route conditions
      system for things like :agent/:host matching and a request
      level #pass method has been added to allow an event handler to
      exit immediately, passing control to the next matching route.
    * Regular expressions may now be used in route patterns. Captures
      are available as an array from "params[:captures]".
    * The #body helper method now takes a block. The block is not
      evaluated until an attempt is made to read the body.
    * Options are now dynamically generated class attributes on the
      Sinatra::Base subclass (instead of OpenStruct); options are
      inherited by subclasses and may be overridden up the
      inheritance hierarchy. The Base.set manages all option related
    * The application file (app_file) detection heuristics are bit
      more sane now. This fixes some bugs with reloading and
      public/views directory detection. All thin / passenger issues
      of these type should be better now.
    * Error mappings are now split into to distinct layers: exception
      mappings and custom error pages. Exception mappings are registered
      with 'error(Exception)' and are run only when the app raises an
      exception. Custom error pages are registered with error(status_code)
      and are run any time the response has the status code specified.
      It's also possible to register an error page for a range of status
      codes: 'error(500..599)'.
    * The spec and unit testing extensions have been modified to take
      advantage of the ability to have multiple Sinatra applications.
      The Sinatra::Test module must be included within the TestCase
      in order to take advantage of these methods (unless the
      'sinatra/compat' library has been required).
    * Rebuilt specs from scratch for better coverage and
      organization. Sinatra 3.2 unit tests have been retained
      under ./compat to ensure a baseline level of compatibility with
      previous versions; use the 'rake compat' task to run these.
    A large number of existing Sinatra idioms have been deprecated but
    continue to be supported through the 'sinatra/compat' library.
    * The "set_option" and "set_options" methods have been deprecated
      due to redundancy; use "set".
    * The "env" option (Sinatra::Base.env) has been renamed to "environment"
      and deprecated because it's too easy to confuse with the request-level
      Rack environment Hash (Sinatra::Base#env).
    * The request level "stop" method has been renamed "halt" and
      deprecated. This is for consistency with `throw :halt`.
    * The request level "entity_tag" method has been renamed "etag" and
      deprecated. Both versions were previously supported.
    * The request level "headers" method has been deprecated. Use
      response['Header-Name'] to access and modify response headers.
    * Sinatra.application is deprecated. Use Sinatra::Application instead.
    * Setting Sinatra.application = nil to reset an application is
      deprecated. You shouldn't have to reset objects anymore.
    * The Sinatra.default_options Hash is deprecated. Modifying this object now
      results in "set(key, value)" invocations on the Sinatra::Base
    * The "body.to_result" convention has been deprecated.
    * The ServerError exception has been deprecated. Any Exception is now
      considered a ServerError.
Commits on Aug 31, 2008
  1. @rtomayko

    Rack 0.4 (remove vendor submodule)

    rtomayko committed
    Use Rack gem instead of freezing.
Commits on Nov 28, 2007
  1. throw :halt

    Blake Mizerany committed
  2. returning

    Blake Mizerany committed
Something went wrong with that request. Please try again.