Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Jan 10, 2015
  1. @vipulnsward

    - Removed test-unit dependency

    vipulnsward authored
    - updated minitest to 5.0
    - Removed Test::Unit::TestCase and started using Minitest::Test instead
    - Fixed usage of assert_raise
    - Fixed usage of refute_nil
    - Fixed and removed usage of assert_nothing_raised
Commits on Mar 14, 2013
  1. @vipulnsward
Commits on Feb 25, 2013
  1. @alexeymuranov
Commits on May 21, 2012
  1. @zzak

    First pass at block styles for tests

    zzak authored
    * test/routing_test.rb
    * test/settings_test.rb
Commits on May 11, 2011
  1. @rkh
Commits on Jan 31, 2011
  1. @rkh

    Explicitly handle the exception for failed loading.

    elij authored rkh committed
    The exception handler was only catching RuntimeError, which probably
    should not be caught by the harness (so a test fails), when it should
    have been catching LoadError exceptions (module not present to test).
    Signed-off-by: Konstantin Haase <>
Commits on Dec 16, 2010
  1. @rkh

    add test for locals passed to haml

    rkh authored
Commits on Mar 16, 2010
  1. @rtomayko

    skip haml / sass tests when they fail to load due to stupid bullshit

    rtomayko authored
    Both haml and sass have the retarded behavior of trying to read a
    VERSION file outside their lib directory. Installing haml or sass
    like a sane person (i.e. into a shared lib directory) and they fail
    on require with ENOENT.
Commits on Apr 25, 2009
  1. @bmizerany

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

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

    Use contest instead of test/spec/mini

    sr authored rtomayko committed
    See <> for more info. The
    contest.rb file is included under the test/ directory.
  2. @rtomayko

    Sane template options [#191]

    rtomayko authored
    * The options hash now takes the :views, :layout, and :locals
      options but also any template-specific options. The generic
      options are removed before calling the template specific render
    * The haml ":options" and ":haml" options are deprecated. These
      should be merged in directly with the options hash.
    * The sass ":sass" option is deprecated. Merge directly with the
      options hash instead.
    * All template engines have an app-level option named the same as
      their engine (erb, haml, sass, etc.). This must be a hash and is
      merged with the options passed to the render method.
    * The :views_directory option is deprecated; renamed :views.
Commits on Mar 27, 2009
  1. @kematzy @rtomayko

    Merge app-level haml/sass options with call options [#184]

    kematzy authored rtomayko committed
    Ensures globally set Haml/Sass configurations can be overridden on
    an individual call basis, while retaining the global values.
    Renamed the #haml() :options key to :haml_options for
    clarity and consistency with the #sass method.
Commits on Jan 14, 2009
  1. @rtomayko
  2. @rtomayko

    Test framework refactoring

    rtomayko authored
    * 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 authored
    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

    Fix whitespace errors across all source files and tests

    rtomayko authored
    I can't stand this shit anymore.
Commits on Apr 19, 2008
  1. @sr

    Add the possibility to configure options that are passed to Haml::Eng…

    sr authored
    …ine when evalutating HAML template.
    Options can be configured in two different ways:
    * Application-wide, using set_option :haml
      e.g.: set_option :haml, :format      => :haml4,
                              :escape_html => true
    * By passing options directly to the `haml` helper
      e.g.: haml '%strong Hello World', :options => {:format => :html4}
    Note that if you use both way, options will be merged.
Commits on Mar 27, 2008
  1. @bmizerany

    added `template` to DSL

    bmizerany authored
Commits on Mar 16, 2008
  1. @bmizerany
Commits on Feb 28, 2008
  1. FIX: Render without layout

    Blake Mizerany authored
  2. Haml & Erb redo

    Blake Mizerany authored
Commits on Feb 24, 2008
  1. Haml

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