Fix slim options test

Signed-off-by: Konstantin Haase <konstantin.mailinglists@googlemail.com>
This commit is contained in:
Steve Hodgkiss 2010-11-05 16:00:08 +00:00 committed by Konstantin Haase
parent ca7fbe5472
commit cea255b3f2
1 changed files with 6 additions and 6 deletions

View File

@ -76,20 +76,20 @@ class SlimTest < Test::Unit::TestCase
it "merges the default slim options with the overrides and passes them to the slim engine" do
mock_app {
set :haml, {:format => :html5, :attr_wrapper => '"'} # default slim attr are <tag attr='single-quoted'>
set :slim, {:format => :html4}
get '/' do
slim "! doctype html\nh1.header Hello World"
end
get '/html4' do
slim "! doctype html\nh1.header Hello World", :format => :html4
get '/html5' do
slim "! doctype html\nh1.header Hello World", :format => :html5
end
}
get '/'
assert ok?
assert_equal "<!DOCTYPE html><h1 class=\"header\">Hello World</h1>", body
get '/html4'
assert ok?
assert_match(/^#{HTML4_DOCTYPE}/, body)
get '/html5'
assert ok?
assert_equal "<!DOCTYPE html><h1 class=\"header\">Hello World</h1>", body
end
end
rescue