Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Test dependency fix #193

Closed
wants to merge 1 commit into from

1 participant

eli
eli

remove haml requirement for running the base tests

this should remove the last 'hard' template test requirement that sinatra itself does not require.
I converted the encoding test to use erb. I figured since erb is in base ruby, and sinatra itself uses erb for the pretty showexceptions code -- this would be a win as it introduces no new base dependency.

eli cactus remove haml requirement for running the base tests
this removes the last 'hard' template test requirement that sinatra itself does
not require
0ed34d5
eli

remove haml requirement for running the base tests

closed by 8547387

this removes the last 'hard' template test requirement that sinatra itself does
not require

Signed-off-by: Konstantin Haase <konstantin.mailinglists@googlemail.com>

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 24, 2011
  1. eli

    remove haml requirement for running the base tests

    cactus authored
    this removes the last 'hard' template test requirement that sinatra itself does
    not require
This page is out of date. Refresh to see the latest.
7 test/encoding_test.rb
View
@@ -1,5 +1,6 @@
# encoding: UTF-8
require File.dirname(__FILE__) + '/helper'
+require 'erb'
class BaseTest < Test::Unit::TestCase
setup do
@@ -9,11 +10,11 @@ class BaseTest < Test::Unit::TestCase
it 'allows unicode strings in ascii templates per default (1.9)' do
next unless defined? Encoding
- @base.new.haml(File.read(@base.views + "/ascii.haml").encode("ASCII"), {}, :value => "åkej")
+ @base.new.erb(File.read(@base.views + "/ascii.erb").encode("ASCII"), {}, :value => "åkej")
end
it 'allows ascii strings in unicode templates per default (1.9)' do
next unless defined? Encoding
- @base.new.haml(:utf8, {}, :value => "Some Lyrics".encode("ASCII"))
+ @base.new.erb(:utf8, {}, :value => "Some Lyrics".encode("ASCII"))
end
-end
+end
2  test/views/ascii.haml → test/views/ascii.erb
View
@@ -1,2 +1,2 @@
This file has no unicode in it!
-= value
+<%= value %>
2  test/views/utf8.haml → test/views/utf8.erb
View
@@ -1,2 +1,2 @@
-%h1= value
+<h1><%= value %></h1>
Ingen vill veta var du köpt din tröja.
Something went wrong with that request. Please try again.