Commit Graph

10 Commits

Author SHA1 Message Date
Zachary Scott 46e8bd67b3 First pass at block styles for tests
TODO:
* test/routing_test.rb
* test/settings_test.rb
2012-05-21 17:21:59 -04:00
lest 8d788de693 use assert body in coffee test 2011-11-09 21:41:04 +02:00
Konstantin Haase e001d62669 adjust require lines for test helper, so it also works properly on 1.9.2 2011-05-11 09:44:02 +02:00
Konstantin Haase e2fc4b5b05 missing templates only raise Errno::ENOENT
plus that did not work anyways
2011-04-13 14:56:37 +02:00
Konstantin Haase a735e34c19 prepare for Tilt 1.3 (while remaining compatible with 1.2) 2011-04-13 14:53:40 +02:00
Konstantin Haase 91992c99f4 check JS availability for CoffeeScript tests properly 2011-04-11 12:46:21 +02:00
elij e16bc71590 Explicitly handle the exception for failed loading.
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 <konstantin.mailinglists@googlemail.com>
2011-01-31 10:34:41 +01:00
Konstantin Haase 5ca92e10f4 adjust tests for new version of coffescript 2010-12-24 16:10:20 +01:00
Konstantin Haase 1d676f41f8 Sets default content type according to template engine used instead of 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
    end

    # text/css
    get('/') do
      sass :index
    end

    # text/css
    get('/') do
      haml :index
      sass :index
    end

    # text/html
    get('/') do
      haml '= sass :index'
    end

It also allows setting the default content type for a template engine:

    set :builder, :content_type => :html

Tests and README adjustments (all languages) included.
2010-09-27 13:25:10 +02:00
Konstantin Haase f58d015b6d Add coffee helper method. Tilt supports CoffeeScript again, but it was not as easy to use as sass or scss, and not documented. Tests and documentation (English and German) included. 2010-09-12 23:09:10 +02:00